fork download
#include <iostream>
#include <string>
using namespace std;

int main()
{
	
	int Height, Weight, Age,Calories; 
		double BMR;
			char Gender, ExerciseType;
					 
	cout.setf(ios::fixed); 
	cout.setf(ios::showpoint);
	cout.precision(0); 
	
	cout << "Please provide your basic information" << endl; //Collecting of inputs for later phase of program.
	cout << "male or female (m or f)? ";
		cin >> Gender;
		
	cout << "age in years? ";
		cin >> Age;
		
	cout << "weight in pounds? ";
		cin >> Weight;
		
	cout << "height in inches? ";
		cin >> Height;
		
	cout << "How active are you?" << endl; 
				cout << "s - sedentary" << endl;
				cout << "c - casual exerciser--exercise occasionally" << endl; 
				cout << "a - active exerciser--exercise 3-4 days per week" << endl;
				cout << "d - devoted exerciser--exercise every day" <<endl;
	cout << "Enter the letter association with your activity level: "; 
		cin >> ExerciseType;
		
	cout << "What type of food do you want to eat? Please use _ between words to create a single word.";
		cin >> food;
		
	cout << "How many calories per item? ";
		cin >> Calories;
		
		
		if (Age >= 65) // Statements that build only once conditions are met and fufills the program.
		{BMR = 1.375 * (655 + (4.3 * Weight) + (4.7 * Height) - (4.7 * Age));
		}
		
			else if (Gender == 'f' || Gender == 'F')
			{BMR = 1.375 * (655 + (4.3 * Weight) + (4.7 * Height) - (4.7 * Age));
			} 
		
				else  (Gender =='m' || Gender == 'M');
				{BMR = 1.375 * (66 + (6.3 * Weight) + (12.9 * Height) - (6.8 * Age));
				}
					
switch(ExerciseType) // Calculations for the differing case
{
	case 's' :
		BMR = (BMR - (BMR * .05));
		cout << "BMR = " << BMR << endl;
		BMR = (BMR / Calories);
		cout << "number of " << food << " eaten = " << BMR;
		break;
	case 'c' :
		BMR = ((BMR * .30) + BMR);
		cout << "BMR = " << BMR << endl;
		BMR = (BMR / Calories);
		cout << "number of " << food << " eaten = " << BMR;
		break;
	case 'a' :
		BMR = ((BMR * .40) + BMR);
		cout << "BMR = " << BMR << endl;
		BMR = (BMR / Calories);
		cout << "number of " << food << " eaten = " << BMR;
		break;
	case 'd' :
		BMR = ((BMR * .50) + BMR);
		cout << "BMR = " << BMR << endl;
		BMR = (BMR / Calories);
		cout << "number of " << food << " eaten = " << BMR;
	default :
		cout << "Invalid Choice" << endl;
	return 0;
}

}
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:38:10: error: ‘food’ was not declared in this scope
   cin >> food;
          ^
stdout
Standard output is empty