C++ : find cube of (a-b)


#include<iostream>
#include<cmath>
#include<conio.h>
using namespace std;
int main()
{
float a,b;
cout<<"a = ";
cin>>a;
cout<<endl;
cout<<"b= ";
cin>>b;
cout<<endl<<endl;
cout<<"The cube of ("<<a<<"-"<<b<<") is "<<pow((a-b),3);
getch();
return(0);
}

No comments:

Post a Comment