0
//
#include <iostream>

using namespace std;


int main() {

int age;
int weight;
int height;

cout << "Enter your age." <<endl;
cin >> age;

cout << "Enter your weight (in inches)." <<endl;
cin >> weight;

cout << "Enter your weight (in pounds)." <<endl;
cin >> height;


if ((age >= 18)&&(age <= 35))&&((weight >= 150)&&(weight <= 235))&&((height >= 66)&&(height <= 78));
{
cout << "QUALIFIED" <<endl;
}
else;
{
cout << "DISQUALIFIED" <<endl;
}
return 0;
}

please help me! i get these errors..

army.cc: In function `int main()':
army.cc:25: error: expected identifier before '(' token
army.cc:25: error: expected `;' before '(' token
army.cc:29: error: expected primary-expression before "else"
army.cc:29: error: expected `;' before "else"

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Grn Xtrm
1

lines 23 and 28

I think Ancient Dragon meant to say lines 23 and 27. :)
Don't put semicolons after if and else.

Edited by Grn Xtrm: n/a

Votes + Comments
Yes I did :)
0

Please mark the thread as solved if you don't need any further help, so people can pass over it instead of wasting there time with an already answered question.
Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.