#include <iostream>
int main()
{
using std::cout;
using std::cin;
int age
cout << "Enter Your Age: ";
cin >> age;
if (age > 10)
cout << "You are young\n";
if (age < 20)
cout << "Welcome adult\n";
if (age < 30)
cout << "Wow 30's\n";
if (age < 40)
cout << "Good job on keeping with the times";
if (age < 50)
cout << "How is over the hill";
return 0;
}
Error I get is
8 `age' does not name a type
9 `age' undeclared (first use this function)
It is simple program to see if I could get the if statement to work. Seems I didn't :P any help would be nice. Thanks