✍️ Get Writing Help
WhatsApp

The correct variable declaration

Suppose that x, y, z, and w are int variables. What is stored in x, y, z, and w after the following statements execute?

x = 9;

y = x – 4;

z = (y + 7) % 6;

w = (x * z) / y – 3;

z = w + (x – y + 2) % x;

Which of the following variable declarations are correct? If a variable declaration is not correct, give the reason(s) and provide the correct variable declaration.  (1, 7)

double conversion = 2.5; //Line 1

char grade = ‘B+’; //Line 2

double 28.5 = num //Line 3

string message = ”First C++ course’; //Line 4

int age = 18 years; //Line 5

int perfectSquare; //Line 6

float x, y, decimal; //Line 7

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102