Flowchart help

I need help creating a flowchart from this source code and I have no idea how to start. I already made the program and the flowchart/pseudocode is what I am stuck on.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//This program is used to calculate the BMI of a person
//and display whether the person is underweight, overweight, or healthy
//BMI = weight*703/height^2
//weight is measured in pounds/lbs
//height is measured in inches

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{

	double weight, height; //define values
	float BMI;

	cout<<"Enter your weight in pounds: "<<endl; 
	cin>>weight;
	cout<<"Enter your height in inches: "<<endl;
	cin>>height;
	BMI = (weight*703)/(height*height);
	cout<<fixed<<showpoint<<setprecision(1);
	cout<<"Your BMI is "<<BMI<<endl;

	if (BMI<18.5)
	{
	cout<<"You are underweight. Eat more food, your too skinny!\n"<<endl;
	}

	else if (BMI>=18.5 && BMI<=25)
	{
	cout<<"You have optimal weight. You are healthy, well done!\n"<<endl;
	}

	else if (BMI>25)
	{
	cout<<"You are overweight. Stop eating so much junkfood and excercise, you fatty!\n"<<endl;
	}
	
system("pause");
return 0;
}
Last edited on
This is a little too trivial for a flowchart imo as flowcharts are best suited for OOB solutions or ones with several function calls. You could create a sequence diagram that shows the flow of command. That would be as simple as following you main from top to bottom.

As for pseudocode just write the program in structured English.


Output "enter weight" prompt
Input weight
Output "enter height" prompt
Input height
Calculate BMI
IF BMI > 18.5
Output "overweight message"
....
...
.


Pseudocode should come first by the way.
Thank you, I can do the rest now.
Topic archived. No new replies allowed.