C++ program to prints the sum, difference, products, quotient, and the remainder of two integers

cprogramming

Write a program that prints the sum, difference, products, quotient, and the remainder of two integers with values that are inputted. Write an object-oriented program to find the sum, difference, products, quotient, and the remainder of two integers with a value that is inputted.

C++ Source Code

#include<iostream.h>
#include<conio.h>
void main()
{
int x, y, sum, pro, dif, rem, quot;
cout<<"Enter First Number:";
cin>>x;
cout<<"Enter Second Number:";
cin>>y;
sum=x+y;
pro=x*y;
dif=x-y;
rem=x%y;
quot=x/y;
cout<<"nThe Sum is:"<<sum<<"nThe Product is:"
<<pro<<"nThe Difference is:"
<<dif<<"nThe Reminder is:"<<rem<<"nThe Quotient"<<quot;
cout<<"nThank you...";
cout<<"nPress any key to continue...";
getch();
}

TutsMaster.org

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.