/* debugMe.cpp */ /* x should have valid values at all times and the code should do what is indicated by the comments */ #include using namespace std; int main(void) { int x=0; /* here I am showing that x is 0 */ cout<<"\nAt the start x is " << x; /* here I want to print out x ten times showing it count from 1 to 10 */ cout << "\nNow I am counting from 1 to 10" ; for(x = 1; x < 10; x++) { cout << "\nx: "<< x; } cout <> x; cout << "\nSetting x to " << x; /* This if statement should test to see if x did got reset correctly It should print out Right, x is newvalue */ if(x = (x+1)) cout << "\nWrong, x is " << x+1; else cout << "\nRight, x is " << x; /* Here I am getting a new value for x and printing it*/ cout <<"\nx is now " << x<> x; return(0); }