Thursday, 18 July 2013



#include "stdafx.h"
#include "conio.h"
#include "stdio.h"
#include "iostream"

using namespace std;

void Number_1();
void Number_2();
void Number_3();
void Number_4();
void Number_5();

int _tmain(int argc, _TCHAR* argv[])
{
        Number_1();
        Number_2();
        Number_3();
        Number_4();
        Number_5();
        getch();
}
void Number_1()
{
       int n;
       int square;
       int cube;
       int sum=0;
       cout<<"enter number1"<<endl;
       cin>>n;
       square=n*n;
       cube=n*n*n;
       sum=square+cube;
       cout<<"sum1="<<sum<<endl;
}
void Number_2()
{
      
       int n;
       int square;
       int cube;
       int sum=0;
       cout<<"enter number2"<<endl;
       cin>>n;
       square=n*n;
       cube=n*n*n;
       sum=square+cube;
       cout<<"sum2="<<sum<<endl;
}
void Number_3()
{
       int n;
       int square;
       int cube;
       int sum=0;
       cout<<"enter number3"<<endl;
       cin>>n;
       square=n*n;
       cube=n*n*n;
       sum=square+cube;
       cout<<"sum3="<<sum<<endl;
}
void Number_4()
{
       int n;
       int square;
       int cube;
       int sum=0;
       cout<<"enter number4"<<endl;
       cin>>n;
       square=n*n;
       cube=n*n*n;
       sum=square+cube;
       cout<<"sum4="<<sum<<endl;
}
void Number_5()
{
       int n;
       int square;
       int cube;
       int sum=0;
       cout<<"enter number4"<<endl;
       cin>>n;
       square=n*n;
       cube=n*n*n;
       sum=square+cube;
       cout<<"sum4="<<sum<<endl;

}
Reactions:

0 comments :

Post a Comment