I used the if and else to make a basic program to tell someone happy birthday but I keep getting an error saying primary expression before else
here is my source code
Code:// Birthday program #include <iostream> #include <cstdlib> #include <cstdio> using namespace std; int main() { int a; cout << "Is it your Birthday today? Type 1 for yes and 2 for no. /t"; cin >> a; if (a==1); { cout << "Happy Birthday I hope today is really good for you!"; } else; { cout << "Then open this on your birthday instead"; } system("PAUSE"); return 0; }



LinkBack URL
About LinkBacks


