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.[In addition it also stores the values of mathematical expression used in the code i.e + , -, *,/]

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.[In addition it also stores the values of mathematical expression used in the code i.e + , -, *,/] 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.[In addition it also stores the values of mathematical expression used in the code i.e + , -, *,/]

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


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