Question #11090

how to write a program to input three values and display rasult

Expert's answer

Please state clearly what action result you want to obtain. Here we multiplied all three entered values as an example.

#include <iostream>

int i=0;
double x, y, z, res;

void main(){
cout<<"Enter x:";
cin>>x;
cout<<"Enter y:";
cin>>y;
cout<<"Enter z:";
cin>>z;
res = x*y*z;
cout<<"Here is the result: res = "<<res<<"\n";
}
LATEST TUTORIALS
APPROVED BY CLIENTS