//Displaying addition, subtraction, multiplication, division and average of three inputs
//Programmer name: Sohail ahmed
//Date:20/02/2010
#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
int num1, num2, num3;
cout<<"Enter 1st integer: ";
cin>>num1;
cout<<"\nEnter 2nd integer: ";
cin>>num2;
cout<<"\nEnter 3rd integer: ";
cin>>num3;
clrscr();
//Output of addition
cout<<"\nAddition: ";
cout<<num1+num2+num3;
//Output of multiplication
cout<<"\nMultiplication: ";
cout<<num1*num2*num3;
//Output of Average
cout<<"\nAverage: ";
cout<<(float)num1+num2+num3/2;
getch();
return 0;
}
0 comments:
Post a Comment