0
I am getting an error...
I am getting an error... Was in the practice and states: /*The else statement Write a program to check if the number is even or odd. Take an integer input from the user, if it is even print "even", otherwise print "odd". Sample Input 25 Sample Output odd */ #include <iostream> using namespace std; int main() { int number; cout << "Enter a number"; cin >> number; //Error line if (number % 2 == 0) { cout<< "even"; } else { cout<< "odd"; } return 0; } /* line 7 Error: âU0000fffcâ not declared in this scope */
3 Answers
+ 1
Copied and pasted that snippet, and it runs without any problem (input 25 - output "odd")
+ 2
worked fine for me with the number 4
+ 1
Hmm...maybe that specific practice program is bugged. I appreciate the quick responses!