Thursday 17 January 2013

Function for Cube

| |


#include<iostream>

using namespace std;

int main()
{
int cube();
int area();
cout<<"The Cube is \n"<<cube();
cout<<"The area is \n" <<area();

system ("pause");}
int cube()
{int a,x;
cout<<"Enter the side for which the cube is foind\n";
    cin>>a;
   
    x=a*a*a;
    return x; }
   
   int area()
   {int b,y;
   cout<<"\nEnter the side\n" ;
   cin>>b;
   y=b*b;
   return y;}
   


Function for Cube


Related Posts Plugin for WordPress, Blogger...
Powered by Blogger.