Here is my code:
Code:
#include <iostream>
using namespace std;
// Hello World!
int main()
{
//Variables For Hello World!
int month, year, specialnumber;
cout<<"Please enter your birth month:";
cin>> month;
cin.ignore();
cout<<"Please enter your birth year:";
cin>> year;
cin.ignore();
cout<<"Your special number is "<< month * year + year - month<<"\n";
cin>> specialnumber;
cin.ignore();
if ( specialnumber < 150 ) {
cout<<"Your number is unlucky!\n";
}
else if ( specialnumber == 151 ) {
cout<<"Go buy a lottery ticket!\n";
}
else {
cout<<"Your special number is lucky. Pet a wet dog!\n";
}
cin.get();
}
It is supposed to change the inputted numbers and then check to see if the number is higher, lower, or equal to a certain number. Then it reads back whether or not your "lucky". It compiles fine, but it will not show the text after the number is calculated.