Question: Exercises 2.3 Write a single C++ statement to accomplish each of the following (assume that using directives have not been used): a)Declare the variables c,
Exercises 2.3 Write a single C++ statement to accomplish each of the following (assume that using directives have not been used):
a)Declare the variables c, thisIsAVariable, q76354 and number to be of type int.
b)Prompt ( ask) the user to enter an integer number .
c)Read an integer called (age) from the user at the keyboard and store it in integer variable.
d)If the variable number is not equal to 7, print "The variable number is not equal to 7".
e) Print the message "This is a C++ program" on one line.
g) Print the message "This is a C++ program" with each word on a separate line.
h) Print the message "This is a C++ program". Separate each word from the next by a tab.
f) Compute the product of the three integers contained in variables x, y and z, and assign the result to the variable result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
