Hey guys,
I've jut started learning c++. It's been only 2 days. I wrote a very simple program but it doesn't work properly. The problem with the program is that it doesn't output anything. Here is the code:
when i run the program it prints out the first line and after the user has entered a number the program exists. I don't know why it doesn't output rest of the stuff. Is this because of my computer or complier?Code:#include <iostream> using namespace std; const int limit = 100; int num = 0; int main() { cout << "Please enter a number: "; cin >> num; if (num >= limit ) cout << "HIGH "; else cout << "LOW "; cout << "You are done!!"; //cin >> num; }
However, if i uncomment the last line which asking for another input then program outputs rest of the stuff and exits after getting another input.
I think something wrong with my complier. I'm using Dev-C++ v 4.9.9.2. Everytime when i run it, it gives me following message and i don't know how to fix it:
"There doesn't seem to be GNU Make File in PATH or in Dev-C++'s Bin path. Please make sure that you have the GNU Make and adjust Bin setting or system PATH environment variable and that make setting in Complier Option contains correct filename, otherwise you will not be able to compile anything,"
Also, could someone please tell me how to output something on new or next line? Because in java i know we can use println to print anything on new line.
Please someone help me? I would really apperciate!! Thanks in advance.