j

Monday, 2 November 2015

Write a program that take the values of x, y and z from user and solve the following equation (x^3+y^3+3xyz)



#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
long int x,y,z,res;
cout<<"Enter the values of x,y and z ::";
cin>>x>>y>>z;
res=(x*x*x)+(y*y*y)+(3*x*y*z);
cout<<"The answer is "<<res;
getch();
}

Subscribe to this Blog via Email :