My error messages are error cannot bind std::istream error Y was not declared error N is not declared error else without a previous if
**I am trying to calculate BMR and need to have program set up so that it calculates the input for a man or a woman (both have different calculation formulas). What am I doing wrong? Beginner c++ for school (one month in). Thank you!
#include <iostream>
int main()
{
//declarevariables
double height = 0.0;
double weight = 0.0;
double age = 0.0;
char client = ‘ ‘;
using namespace std;
//enter input items
cout << "Enter Height: ";
cin >> “height”;
cout << "Enter Weight: ";
cin>> "weight";
cout << "Enter Age: ";
cin>> "age"
if else (client) == "Y");
cout <<"Is client male?";
cin >> Y;
else
cin >> N;
//end if
//calculate female or male total
weight= weight/2.2
height= (height x 12) x 2.54
Y= (10 x weight) + (6.25 x height) – (5 x age) + 5
N= (10 x weight) + (6.25 x height) – (5 x age) – 161
return 0;
} //end of main function
Aucun commentaire:
Enregistrer un commentaire