
Computer Science Principles
Algorithms and Programming Solutions
Question 2
1 pts
Suppose you have the following variables:
double x;
int y;
char z;
Assume the following data is inputted from the console into the program in this
sequence (using cin):
7.15 P 29
What value (if any) is assigned to x, y, and z after each of the following statements
execute?
cin >> X >> Z >> y;
O x = 7.15 y = 29 z = P
O x = 29 y = Pz = 7.15
O x = 7.15 y = P z = 29
O x = 7 y = Pz= 29