C++ Programming

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

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();
}

Related Articles

Back to top button

Adblock Detected

Please turn off your Adblocker to view your content.