Consider the following statement: int x,y,z, x=3; y=7; z=9; if ( x >y) if ( x-y == 4) z = 33; else z=77; What is the value of z?
#include <iostream>
using namespace std;
int main()
{
int x,y,z;
x=3;
y=7;
z=9;
if ( x >y) if ( x-y == 4) z = 33; else z=77;
cout<<z;
return 0;
}
// the value of z is 9
Comments
Leave a comment