Ok, when I run my program it is asking me twice what I only need to be asked once.
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
//Variables
double calories = 0.0;
double weight = 0.0;
char gender = ' ';
char level = ' ';
//enter gender
cout << "Enter Gender: ";
cin >> gender;
gender = toupper (gender);
//calculate
if (gender == 'F');{
cout << "Enter Your Activity Level (A/I): ";
cin >> level;
level = toupper(level);
}
if (level == 'A');
cout << "Enter Current Weight: ";
cin >> weight;
calories = (weight*12);
cout << "You Need This Many Calories Daily To Maintain Your Weight: " << calories << endl;
else (level == 'I');
cout << "Enter Current Weight: ";
cin >> weight;
calories = (weight*10);
cout << "You Need This Many Calories Daily To Maintain Your Weight: " << calories << endl;
else (gender == 'M'); {
cout << "Enter Your Activity Level (A/I): ";
cin >> level;
level = toupper(level);
}
if (level == 'A');{
cout << "Enter Current Weight: ";
cin >> weight;
calories = (weight*15);
cout << "You Need This Many Calories Daily To Maintain Your Weight: " << calories <<endl;
}
else (level == 'I');{
cout << "Enter Current Weight: ";
cin >> weight;
calories = (weight*13);
cout << "You Need This Many Calories Daily To Maintain Your Weight: " << calories <<endl;
}
// display output
system ("pause");
return 0;
} //end main function
Would someone please guide me in the right direction. Thank you in advance. :)