Hi -
I'm supposed to figure out what the output of this code should be. However, when I run it in a compiler (using Microsoft Visual Studio at the moment), it won't build a solution/run the program, but no errors are highlighted by the compiler.
Any input would be great.
Thanks!
#include <iostream >
usingnamespace std;
void TestIt(int Y);
int main (void)
{
int A, B;
A = 5;
TestIt(A);
B = 3;
TestIt(B);
return 0;
}
void TestIt (int Y)
{
int Z(7);
staticint X(2);
Z= Y*3 - Z;
Y = Y * 2;
X ++;
cout << "X = " << X << " Y = " << Y << " Z = " << Z << "\n\n" ;
return;
}
However, when I run it in a compiler (using Microsoft Visual Studio at the moment), it won't build a solution/run the program, but no errors are highlighted by the compiler.