0

can anyone help me? what is the code, for example, when the input is 1 foot and the output is 12 inch.? and 2 feet = 24 inches?

16th Nov 2016, 10:24 AM
kenn lingcay
kenn lingcay - avatar
2 ответов
+ 2
int nFoot; cin>>nFoot; cout<<nFoot*12; Eg says 1=12, 2=24 means simply we need to multiply the i/p by 12.
16th Nov 2016, 10:30 AM
Venkatesh(Venki)
Venkatesh(Venki) - avatar
0
#include<iostream> using namespace std; int main() { int a, b, x, y, z; cout<<"GRADE"<<endl; cin>>a; x = (a)*(40/100); cout<<"EQUIVALENT GRADE IN MIDTERM(40%)"<< x<<endl; cin>>b; y = (b)*(60/100); cout<<"EQUIVALENT GRADE IN FINALTERM(60%)"<< y<<endl; z = x + y; cout<<"FINAL GRADE"<<endl<<z; return 0; }
16th Nov 2016, 10:29 AM
noel