Umm I created a code which will create many results with specific ints(integers).I use Code::Blocks as my compiler.The code works inside the compiler,but when I go to the saved folder and run the batch file this is what happens-I enter a number and press enter and it simply closes itself!@What's wrong?
#include <iostream>
using namespace std;
int main()
{
int thisisanumber;
cout<<"Give me a number: ";
cin>>thisisanumber;
if ( thisisanumber == 80 || thisisanumber == 13 ) {
cout<<"How did you?!... ";
}
else if ( thisisanumber == 7 || thisisanumber == 11 ) {
cout<<"Awesomeness controls you and you control awesomeness!";
}
else if ( thisisanumber == 9 || thisisanumber == 14 ) {
cout<<"Pretty good!";
}
else if ( thisisanumber == 15 || thisisanumber == 55 ) {
cout<<"Not bad nor good.";
}
else if ( thisisanumber == 22 || thisisanumber == 43 ) {
cout<<"Average...";
}
else if ( thisisanumber == 43 || thisisanumber == 33 ) {
cout<<"You need to improve the part of your brain-RANDOMNESS!";
}
else if ( thisisanumber == 69 || thisisanumber == 49 ) {
cout<<"Go visit a random doctor.";
}
else {
cout<<"Even the word BAD would feel ashamed to go to you!";
}
cin.get();
}
Reply quickly guys.
Signing off,
C++creator: