|
-
January 22nd, 2011, 12:28 AM
#1
C++ Remainder Basic Problem...
include <iostream>
using namespace std;
int main() {
int n;
cout << "Enter a Number and press enter";
cin >> n;
if (n % 2 == 0 )
cout << "The Number is even";
else
cout << "The Number is odd";
return 0;
}
instead of showing me the cout it just end after cin >> enter.
adding system("pause"); do make it work but isnt system("pause") bad?
i was told to use cin.get(); instead but in this case cin.get(); doesnt work. WHY?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|