> n; cout<<"The number is: " << n; return 0; } I tried uninstalling it " /> > n; cout<<"The number is: " << n; return 0; } I tried uninstalling it " /> > n; cout<<"The number is: " << n; return 0; } I tried uninstalling it "/>

I wrote a simple program in Dev c++ and my problem is that it terminate instantly without even taking an input:((

27 views Asked by At

#include using namespace std;

int main(){

int n;
cout<<"Enter a number: ";
cin>> n;
cout<<"The number is: " << n;
return 0;

}

I tried uninstalling it and install it again but it just keeps doing that.

1

There are 1 answers

1
Martín Nieva On

Use getch() before return 0. You need to do include <conio.h> to be able to use it.