173k views
3 votes
Create a C++ program that consists of the following: In main create the following three variables: A char named theChar A double named theDouble An int named theInt Fill each of these variables with data taken as input from the keyboard using a single cin statement. Perform the following task on each variable: Increment theChar by one Decrement theDouble by two Square theInt This should be done on separate lines. Note, outputting theChar + 1 is not modifying the variable. It is simply outputting it. Output the value of each variable to the screen on separate lines using cout statements. Your program should also output the name of the variable followed by a colon.

1 Answer

3 votes

Answer:

The source code and output is attached.

I hope it will help you!

Step-by-step explanation:

Create a C++ program that consists of the following: In main create the following-example-1
Create a C++ program that consists of the following: In main create the following-example-2
User Anothermh
by
5.3k points