Hi, ive just signed up, ive wrote my first C++ program, but it terminates as soon as i enter an interger, plz help me!
Code:#include <iostream> using namespace std; int main () { int x; cout << "Please enter an interger to continue..."; cin >> x; if (x < 0) cout << "You entered a negative number! Program terminated!"; else if (x > 0) cout << "Thank you for participating in this program!" << endl; return 0; }