Bachelors of Computer Sciences
Would you like to react to this message? Create an account in a few clicks or log in to continue.

A C++ Program that takes three inputs from the user, stores them in variables, performs 4 mathematical operation on them and then displays the result to user.

Go down

A C++ Program that takes three inputs from the user, stores them in variables, performs 4 mathematical operation on them and then displays the result to user. Empty A C++ Program that takes three inputs from the user, stores them in variables, performs 4 mathematical operation on them and then displays the result to user.

Post  Code Maestro Wed Nov 07, 2012 2:34 pm

Source Code 1

Code:
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
   int a,b,c;
   clrscr();
   cout<<"\n Enter First Number: ";
   cin>>a;
   cout<<"\n Enter Second Number:";
   cin>>b;
   cout<<"\n Enter Third Number:";
   cin>>c;
   cout<<"\n The Sum Is = "<<a+b+c;
   cout<<"\n The Subtraction is ="<<a-b-c;
   cout<<"\n The Multiplication is ="<< (a*b)*c;
   cout<<"\n The Division is ="<<(a/b)/c;
   getch();
}


Source Code 2

Code:
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c;
cout<<"Enter First Integer";
cin>>a;
cout<<"Enter Second Integer";
cin>>b;
cout<<"Enter Third Integer";
cin>>c;
cout<<"\ The Sum ="<<a+b+c<<endl;
cout<<"The Subtraction ="<<a-b-c<<endl;
cout<<"The Multiplication ="<<a*b*c<<endl;
cout<<"The Division ="<<(a/b)/c<<endl;
getch();
}

Code Maestro

Posts : 100
Join date : 2012-10-31

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum