#include <iostream>
int Cube ( int ) ; // prototype
using namespace std;
int main ()
{
int x;
int y ;
x = 14 ;
y = 9 ;
cout <<"My Number =" << y ;
cout <<"and its cube is:" << Cube (y) << endl ;
cout <<"Your Number =" << x ;
cout <<"and its cube is:" << Cube (x) << endl ;
return 0;
}
int Cube ( int n)
{
int a;
a = n*n*n;
return a;
}
*************************************
output:
int Cube ( int ) ; // prototype
using namespace std;
int main ()
{
int x;
int y ;
x = 14 ;
y = 9 ;
cout <<"My Number =" << y ;
cout <<"and its cube is:" << Cube (y) << endl ;
cout <<"Your Number =" << x ;
cout <<"and its cube is:" << Cube (x) << endl ;
return 0;
}
int Cube ( int n)
{
int a;
a = n*n*n;
return a;
}
*************************************
output:
Comments
Post a Comment