Someone please help me! im a newbie in C++ but i need to make a flow chart and i don't know how.

Please can someone make me a flow chart of this code right here. please someone help me.

#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>

struct profile
{
char name[20];
int age;
char gender[20];
}pro;

int DotaQuestion(int& num){ //function for catefory no. 5
char x;
char ans1[20],ans2[20],ans3[20],ans4[20],ans5[20];
cout<<"1.What do you call the good guys in frozen throne?"<<endl;
cin>>ans1;
if(strstr(ans1,"sentinel"))
num++;
cout<<"2.Who is the god of the olympus?"<<endl;
cin>>ans2;
if(strstr(ans2,"zeus"))
num++;
cout<<"3.What is the name of the item that gives 200+ damage ponts?"<<endl;
cin>>ans3;
if(strstr(ans3,"divine"))
num++;
cout<<"4.Who is this hero also know as anti-mage?"<<endl;
cin>>ans4;
if(strstr(ans4,"magina"))
num++;
cout<<"5.Where can you get the item Aegies?"<<endl;
cin>>ans5;
if(strstr(ans5,"roshan"))
num++;
cout<<"You got "<<num<<" correct answers";
cout<<"\nDo you want to know the correct answers?(y/n)";
cin>>x;
if(x=='Y'||x=='y'){
cout<<"\nThe answer are: \n1-sentinel\n2-zeus\n3-divine\n4-magina\n5-roshan";
cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
getch();}

return num;
}

int ScienceQuestion(int& num){ //function for catefory no. 4
char x;
char ans1[20],ans2[20],ans3[20],ans4[20],ans5[20];
cout<<"1.Is anything that occupies space."<<endl;
cin>>ans1;
if(strstr(ans1,"matter"))
num++;
cout<<"2.What is the name of second planet in our solar system?"<<endl;
cin>>ans2;
if(strstr(ans2,"mars"))
num++;
cout<<"3.What is the name of the galaxy which we belong to?"<<endl;
gets(ans3);
if(strstr(ans3,"milky way"))
num++;
cout<<"4.It is a large mass of rocks and earth that suddenly and quikly moves down the sides of a mountain or hill?"<<endl;
cin>>ans4;
if(strstr(ans4,"landslide"))
num++;
cout<<"5.It is a very large structure built especially in ancient Egypt that has a square base and four triangular sides which form a point at the top?"<<endl;
cin>>ans5;
if(strstr(ans5,"pyramid"))
num++;
cout<<"\nYou got "<<num<<" correct answers";
cout<<"\nDo you want to know the correct answers?(y/n)";
cin>>x;
if(x=='Y'||x=='y'){
cout<<"\nThe answer are: \n1-matter\n2-mars\n3-milky way\n4-landslide\n5-pyramid";
cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
getch();}

return num;
}

int TurboQuestion(int& num){ //function for catefory no. 2
char x;
char ans1[20],ans2[20],ans3[20],ans4[20],ans5[20];
cout<<"1.Is an array of character whose last character is null"<<endl;
cin>>ans1;
if(strstr(ans1,"string"))
num++;
cout<<"2.Is an data structure which allows a colletive name to be given to a group of elements which all have the same type?"<<endl;
cin>>ans2;
if(strstr(ans2,"arrays"))
num++;
cout<<"3.Is an collective of variables under a single name?"<<endl;
cin>>ans3;
if(strstr(ans3,"structure"))
num++;
cout<<"4.The process of breaking down a program into a number of modules or function?"<<endl;
gets(ans4);
if(strstr(ans4,"hierarchical decomposition"))
num++;
cout<<"5. Is a group of statments that is exeuted when it is called from some point of the program?"<<endl;
cin>>ans5;
if(strstr(ans5,"function"))
num++;
cout<<"\nYou got "<<num<<" correct answers.";
cout<<"\nDo you want to know the correct answers?(y/n)";
cin>>x;
if(x=='Y'||x=='y'){
cout<<"\nThe answer are: \n1-string\n2-arrays\n3-structure\n4-heierarchical decomposition\n5-function";
cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
getch();}

return num;
}

int MathQuestion(int& num){ //function for catefory no. 3
char x;
int ans1,ans2,ans3,ans4,ans5;
cout<<"1.There are 14 chairs at a party,8 are yellow and 2 are black.The rest are orange. How many orange hairs are there?"<<endl;
cin>>ans1;
if(ans1==4)
num++;
cout<<"2. Gaffny read 2/3 of a book. She calculated that she read 90 pages more than the rest of it. How many pages does the book have?"<<endl;
cin>>ans2;
if(ans2==270)
num++;
cout<<"3.I divided a number by 5. Then I subtracted 154 from the answers and got 6.What was the first number?"<<endl;
cin>>ans3;
if(ans3==800)
num++;
cout<<"(2 3 _ 8 12) Fimd the missing number."<<endl;
cin>>ans4;
if(ans4==5)
num++;
cout<<"(4 9 16 _ 36)Find the missing number."<<endl;
cin>>ans5;
if(ans5==25)
num++;
cout<<"\nYou got "<<num<<" correct answers";
cout<<"\nDo you want to know the correct answers?(y/n)";
cin>>x;
if(x=='Y'||x=='y'){
cout<<"\nThe answer are: \n1-4\n2-270\n3-800\n4-5\n5-25";
cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
getch();}

return num;
}

int AnimeQuestion(int& num){ //function for catefory no. 1
char x;
int ans1,ans2,ans4;
char ans3[20],ans5[20];
cout<<"1.Anime is an abbreviation for the term animation. When was the first known japanese animation produced?"<<endl;
cin>>ans1;
if(ans1==1917)
num++;
cout<<"2.Pokemon, one of the most popular and well known animations, was created by Stoshi tajiri, When did he create it?"<<endl;
cin>>ans2;
if(ans2==1996)
num++;
cout<<"3.Manga is another term used for anime, It is also called?"<<endl;
gets(ans3);
if(strstr(ans3,"japanese comics"))
num++;
cout<<"4.What year did the american adaptation of the series digimon get released?"<<endl;
cin>>ans4;
if(ans4==2000)
num++;
cout<<"5.What is the magazine developing company that features popular anime like Naruto,Haikyu!!,Gin Tama,Bleach,One Piece, Nisekoi?"<<endl;
gets(ans5);
if(strstr(ans5,"weekly shonen jump"))
num++;
cout<<"\n\nYou got "<<num<<" correct answers.";
cout<<"\nDo you want to know the correct answers?(y/n)";
cin>>x;
if(x=='Y'||x=='y'){
cout<<"\nThe answer are: \n1-1917\n2-1997\n3-japanese comics\n4-2000\n5-weekly shonen jump";
cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
getch();}
return num;
}

int main()
{
start:
clrscr();
int choice;
int no=0;
char again1;
char dota,sci,math,turbo,anime;
cout<<"Name: ";
cin.getline(pro.name,20);
cout<<"Age: ";
cin>>pro.age;
cout<<"Gender: ";
cin>>pro.gender;

cout<<"\nDirection: Answer atleast 3 correct answers from 5 question to win the game.\nNote:Please type only small letters, capital letters will be considered wrong.";
cout<<"\n\n\tPlease choose 1 category you want";
cout<<"\n\t1-Anime\n\t2-Turbo C++\n\t3-Math\n\t4-Science\n\t5-Defense of the Ancient";
cout<<"\n\nYour Choice is: ";
cin>>choice;
switch(choice) //use for the choices that you pick
{
case 1:
cout<<"\nThe category you pick is Anime. Are you ready?(y/n)";
cin>>anime;
if(anime=='y'||anime=='Y'){
clrscr(); //to clear the screen
AnimeQuestion(no); //function for category 1
break;}
if(anime=='n'||anime=='N'){
break;}
case 2:
cout<<"\nThe category you pick is turbo c++. Are you ready?(y/n)";
cin>>turbo;
if(turbo=='y'||turbo=='Y'){
clrscr(); //to clear the screen
TurboQuestion(no); //function for category 2
break;}
if(turbo=='n'||turbo=='N'){
break;}

case 3:
cout<<"\nThe category you pick is Math. Are you ready?(y/n)";
cin>>math;
if(math=='y'||math=='Y'){
clrscr(); //to clear the screen
MathQuestion(no); //function for category 3
break;}
if(math=='n'||math=='N'){
break;}

case 4:
cout<<"\nThe category you pick is Science. Are you ready?(y/n)";
cin>>sci;
if(sci=='y'||sci=='Y'){
clrscr(); //to clear the screen
ScienceQuestion(no); //function for category 4
break;}
if(sci=='n'||sci=='N'){
break;}
case 5:
cout<<"\nThe category you pick is Defense of the Ancient. Are you ready?(y/n)";
cin>>dota;
if(dota=='y'||dota=='Y'){
clrscr(); //to clear the screen
DotaQuestion(no); //function for category 5
break;}
if(dota=='n'||dota=='N'){
break;}

default:
cout<<"\nNot in the choices";
cout<<"\nTHE RESULT WILL DISPLAY YOU LOSE BUT YOU CAN TRY AGAIN";
getch();
break;
}
clrscr();
cout<<"\nName: "<<pro.name;
cout<<"\nAge: "<<pro.age;
cout<<"\nGender: "<<pro.gender;

cout<<"\n\nRESULT:"<<endl;

if(no>=3)
cout<<"YOU WIN THE GAME!";
if(no<3)
cout<<"YOU LOSE THE GAME!";

cout<<"\nDO YOU WANT TRO TRY AGAIN?(y/n)";
cin>>again1;
cin.ignore();

if(again1=='y'||again1=='Y')
goto start;

getch();
return 0;
}
http://www.cplusplus.com/articles/jEywvCM9/

If needed, split post into multiple posts rather than removing all the formatting to make it fit. I imagine most people took one glance at that and moved on to something else.

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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>

struct profile
{
	char name[20];
	int age;
	char gender[20];
}pro;

int DotaQuestion(int& num){ //function for catefory no. 5
	char x;
	char ans1[20],ans2[20],ans3[20],ans4[20],ans5[20];
	cout<<"1.What do you call the good guys in frozen throne?"<<endl;
	cin>>ans1;
	if(strstr(ans1,"sentinel"))
		num++;
	cout<<"2.Who is the god of the olympus?"<<endl;
	cin>>ans2;
	if(strstr(ans2,"zeus"))
		num++;
	cout<<"3.What is the name of the item that gives 200+ damage ponts?"<<endl;
	cin>>ans3;
	if(strstr(ans3,"divine"))
		num++;
	cout<<"4.Who is this hero also know as anti-mage?"<<endl;
	cin>>ans4;
	if(strstr(ans4,"magina"))
		num++;
	cout<<"5.Where can you get the item Aegies?"<<endl;
	cin>>ans5;
	if(strstr(ans5,"roshan"))
		num++;
	cout<<"You got "<<num<<" correct answers";
	cout<<"\nDo you want to know the correct answers?(y/n)";
	cin>>x;
	if(x=='Y'||x=='y'){
		cout<<"\nThe answer are: \n1-sentinel\n2-zeus\n3-divine\n4-magina\n5-roshan";
		cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
		getch();}

	return num;
}

int ScienceQuestion(int& num){ //function for catefory no. 4
	char x;
	char ans1[20],ans2[20],ans3[20],ans4[20],ans5[20];
	cout<<"1.Is anything that occupies space."<<endl;
	cin>>ans1;
	if(strstr(ans1,"matter"))
		num++;
	cout<<"2.What is the name of second planet in our solar system?"<<endl;
	cin>>ans2;
	if(strstr(ans2,"mars"))
		num++;
	cout<<"3.What is the name of the galaxy which we belong to?"<<endl;
	gets(ans3);
	if(strstr(ans3,"milky way"))
		num++;
	cout<<"4.It is a large mass of rocks and earth that suddenly and quikly moves down the sides of a mountain or hill?"<<endl;
	cin>>ans4;
	if(strstr(ans4,"landslide"))
		num++;
	cout<<"5.It is a very large structure built especially in ancient Egypt that has a square base and four triangular sides which form a point at the top?"<<endl;
	cin>>ans5;
	if(strstr(ans5,"pyramid"))
		num++;
	cout<<"\nYou got "<<num<<" correct answers";
	cout<<"\nDo you want to know the correct answers?(y/n)";
	cin>>x;
	if(x=='Y'||x=='y'){
		cout<<"\nThe answer are: \n1-matter\n2-mars\n3-milky way\n4-landslide\n5-pyramid";
		cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
		getch();}

	return num;
}

int TurboQuestion(int& num){ //function for catefory no. 2
	char x;
	char ans1[20],ans2[20],ans3[20],ans4[20],ans5[20];
	cout<<"1.Is an array of character whose last character is null"<<endl;
	cin>>ans1;
	if(strstr(ans1,"string"))
		num++;
	cout<<"2.Is an data structure which allows a colletive name to be given to a group of elements which all have the same type?"<<endl;
	cin>>ans2;
	if(strstr(ans2,"arrays"))
		num++;
	cout<<"3.Is an collective of variables under a single name?"<<endl;
	cin>>ans3;
	if(strstr(ans3,"structure"))
		num++;
	cout<<"4.The process of breaking down a program into a number of modules or function?"<<endl;
	gets(ans4);
	if(strstr(ans4,"hierarchical decomposition"))
		num++;
	cout<<"5. Is a group of statments that is exeuted when it is called from some point of the program?"<<endl;
	cin>>ans5;
	if(strstr(ans5,"function"))
		num++;
	cout<<"\nYou got "<<num<<" correct answers.";
	cout<<"\nDo you want to know the correct answers?(y/n)";
	cin>>x;
	if(x=='Y'||x=='y'){
		cout<<"\nThe answer are: \n1-string\n2-arrays\n3-structure\n4-heierarchical decomposition\n5-function";
		cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
		getch();}

	return num;
}

int MathQuestion(int& num){ //function for catefory no. 3
	char x;
	int ans1,ans2,ans3,ans4,ans5;
	cout<<"1.There are 14 chairs at a party,8 are yellow and 2 are black.The rest are orange. How many orange hairs are there?"<<endl;
	cin>>ans1;
	if(ans1==4)
		num++;
	cout<<"2. Gaffny read 2/3 of a book. She calculated that she read 90 pages more than the rest of it. How many pages does the book have?"<<endl;
	cin>>ans2;
	if(ans2==270)
		num++;
	cout<<"3.I divided a number by 5. Then I subtracted 154 from the answers and got 6.What was the first number?"<<endl;
	cin>>ans3;
	if(ans3==800)
		num++;
	cout<<"(2 3 _ 8 12) Fimd the missing number."<<endl;
	cin>>ans4;
	if(ans4==5)
		num++;
	cout<<"(4 9 16 _ 36)Find the missing number."<<endl;
	cin>>ans5;
	if(ans5==25)
		num++;
	cout<<"\nYou got "<<num<<" correct answers";
	cout<<"\nDo you want to know the correct answers?(y/n)";
	cin>>x;
	if(x=='Y'||x=='y'){
		cout<<"\nThe answer are: \n1-4\n2-270\n3-800\n4-5\n5-25";
		cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
		getch();}

	return num;
}

int AnimeQuestion(int& num){ //function for catefory no. 1
	char x;
	int ans1,ans2,ans4;
	char ans3[20],ans5[20];
	cout<<"1.Anime is an abbreviation for the term animation. When was the first known japanese animation produced?"<<endl;
	cin>>ans1;
	if(ans1==1917)
		num++;
	cout<<"2.Pokemon, one of the most popular and well known animations, was created by Stoshi tajiri, When did he create it?"<<endl;
	cin>>ans2;
	if(ans2==1996)
		num++;
	cout<<"3.Manga is another term used for anime, It is also called?"<<endl;
	gets(ans3);
	if(strstr(ans3,"japanese comics"))
		num++;
	cout<<"4.What year did the american adaptation of the series digimon get released?"<<endl;
	cin>>ans4;
	if(ans4==2000)
		num++;
	cout<<"5.What is the magazine developing company that features popular anime like Naruto,Haikyu!!,Gin Tama,Bleach,One Piece, Nisekoi?"<<endl;
	gets(ans5);
	if(strstr(ans5,"weekly shonen jump"))
		num++;
	cout<<"\n\nYou got "<<num<<" correct answers.";
	cout<<"\nDo you want to know the correct answers?(y/n)";
	cin>>x;
	if(x=='Y'||x=='y'){
		cout<<"\nThe answer are: \n1-1917\n2-1997\n3-japanese comics\n4-2000\n5-weekly shonen jump";
		cout<<"\n\nYour answers:"<<'\n'<<ans1<<'\n'<<ans2<<'\n'<<ans3<<'\n'<<ans4<<'\n'<<ans5;
		getch();}
	return num;
}
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
int main()
{
start:
	clrscr();
	int choice;
	int no=0;
	char again1;
	char dota,sci,math,turbo,anime;
	cout<<"Name: ";
	cin.getline(pro.name,20);
	cout<<"Age: ";
	cin>>pro.age;
	cout<<"Gender: ";
	cin>>pro.gender;

	cout<<"\nDirection: Answer atleast 3 correct answers from 5 question to win the game.\nNote:Please type only small letters, capital letters will be considered wrong.";
	cout<<"\n\n\tPlease choose 1 category you want";
	cout<<"\n\t1-Anime\n\t2-Turbo C++\n\t3-Math\n\t4-Science\n\t5-Defense of the Ancient";
	cout<<"\n\nYour Choice is: ";
	cin>>choice;
	switch(choice) //use for the choices that you pick
	{
	case 1:
		cout<<"\nThe category you pick is Anime. Are you ready?(y/n)";
		cin>>anime;
		if(anime=='y'||anime=='Y'){
			clrscr(); //to clear the screen
			AnimeQuestion(no); //function for category 1
			break;}
		if(anime=='n'||anime=='N'){
			break;}
	case 2:
		cout<<"\nThe category you pick is turbo c++. Are you ready?(y/n)";
		cin>>turbo;
		if(turbo=='y'||turbo=='Y'){
			clrscr(); //to clear the screen
			TurboQuestion(no); //function for category 2
			break;}
		if(turbo=='n'||turbo=='N'){
			break;}

	case 3:
		cout<<"\nThe category you pick is Math. Are you ready?(y/n)";
		cin>>math;
		if(math=='y'||math=='Y'){
			clrscr(); //to clear the screen
			MathQuestion(no); //function for category 3
			break;}
		if(math=='n'||math=='N'){
			break;}

	case 4:
		cout<<"\nThe category you pick is Science. Are you ready?(y/n)";
		cin>>sci;
		if(sci=='y'||sci=='Y'){
			clrscr(); //to clear the screen
			ScienceQuestion(no); //function for category 4
			break;}
		if(sci=='n'||sci=='N'){
			break;}
	case 5:
		cout<<"\nThe category you pick is Defense of the Ancient. Are you ready?(y/n)";
		cin>>dota;
		if(dota=='y'||dota=='Y'){
			clrscr(); //to clear the screen
			DotaQuestion(no); //function for category 5
			break;}
		if(dota=='n'||dota=='N'){
			break;}

	default:
		cout<<"\nNot in the choices";
		cout<<"\nTHE RESULT WILL DISPLAY YOU LOSE BUT YOU CAN TRY AGAIN";
		getch();
		break;
	}
	clrscr();
	cout<<"\nName: "<<pro.name;
	cout<<"\nAge: "<<pro.age;
	cout<<"\nGender: "<<pro.gender;

	cout<<"\n\nRESULT:"<<endl;

	if(no>=3)
		cout<<"YOU WIN THE GAME!";
	if(no<3)
		cout<<"YOU LOSE THE GAME!";

	cout<<"\nDO YOU WANT TRO TRY AGAIN?(y/n)";
	cin>>again1;
	cin.ignore();

	if(again1=='y'||again1=='Y')
		goto start;

	getch();
	return 0;
}
Thank you so much esslercuffi!!!!
Topic archived. No new replies allowed.