quizz 1

#include <iostream>

using namespace std;

int main(){

float r, h, v;

cout << “Give me the radius value:” << endl;
cin >> r;
cout << “Give me the height value: ” << endl;
cin >> h;
v=3.1416*(r*r)*h;
cout << “The volume of the cilinder is: ” << v << endl;

return 0;

}

———————————————————–

#include <iostream>

using namespace std;

int main(){
int i1, i2, m, d, r;

cout << “Give the value of two integer numbers” << endl;
cin>> i1;
cin>> i2;
m=i1*i2;
d=i1/i2;
r=i1%i2;
cout << “The product of the number is: ” << m << endl;
cout << “The division result is: ” << d << endl;
cout << “The remainder from the division is: ” << r << endl;

return 0;

}

—————————————-

#include <iostream>

using namespace std;

int main(){
float i1, i2, m, d, a, s;

cout << “Give the value of two numbers” << endl;
cin>> i1;
cin>> i2;
m=i1*i2;
d=i1/i2;
a=i1+i2;
s=i1-i2;
cout << “The product of the number is: ” << m << endl;
cout << “The division result is: ” << d << endl;
cout << “The adittion is: ” << a << endl;
cout << “The subtraction is: ” << s << endl;

return 0;
}

CC BY-SA 4.0 quizz 1 by codemaster2016 is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.