How to write a program that will display the values of A, B, and C with the respective formulas?

How do you write a C++ program that will display the values of A, B and C with the respective formulas?

A = (x+y) * z/3;
B = x+y * (y+z/2)-15;
C = x + (y+z) - (x+y);

If A, B and C is to be declared. Double data type and x, y, z are int data type where:
x=3
y=4
z=5
1
2
3
4
5
6
7
8
9
10
double x = 3;
double y=4;
double z=5;

double A = (x+y) * z/3;
double B = x+y * (y+z/2)-15;
double C = x + (y+z) - (x+y); 

//Figure out how to display yourself
//Hint: there is Tutorials section on this site. 
Topic archived. No new replies allowed.