im righting in c++ and i build the program and then run it but i get no output
(pic of program and results)
my build thing is:
- Code: Select all
{
"path": "c:\\MinGW\\bin\\",
"cmd": ["mingw32-g++.exe", "-Wall", "-time", "$file", "-o", "$file_base_name"]
}
my Program is:
- Code: Select all
#include <iostream>
#include <cstdlib>
using namespace std;
int main(int argc, char* argv[])
{
int lucky ;
cout << "Enter your lucky number and press return: " ;
cin >> lucky ;
for (int i=1; i<=10; i++) {
cout << i << " hello world" << endl ;
if ( i == lucky ) {
cout << "that was lucky!" << endl ;
} else {
cout << endl ;
}
}
}
Ps. im dyslexic so sry for the spelling