Im using an online executor. compileonline.com to run my codes.
Here is the problem. i put #include<conio> it says error so i removed it. problem solved.. i think.
Then I cant seem to get it right on the height=hb-hg?
also error on the getch(); ..
can someboy help?
because after this code there is a continuation of the weight, status, age and interests. INT.
i also put
int hg,hb,wg,wb,sg,sb,ag,ab,ig,ib; //thats after the first bracket ({),[int hg(int heightgirl)]
do i put this code then add the int height, int weight etc?
Here is the question for this program.
1. create a program which asks for the corresponding input to produce certain outputs.
INPUT:
Height of girl, Height of Boy
condition:
height of boy should not be less than 2inches but not greater than 6inches of height of girl
OUTPUT:
"Somebody has to grow up"
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
|
#include <iostream>
using namespace std;
int main()
{
{
int hb;
cout<<"Height of boy (in inches):";
cin>>hb;
int hg;
cout<<"Height of girl (in inches):";
cin>>hg;
height= (hb-hg);
if (height=<2 || height=>6)
cout<<"Somebody has to grow up."<<endl;
}
return 0;
getch();
}
|