C++ Exercises
C++ Program to calculate the Remainder of two numbers.
Let see the program Remainder two numbers.
#include <iostream> using namespace std; int main() { int number1,number2,mod; cout<<"Enter First number :"; cin>>number1; cout<<"Enter the second number:"; cin>>number2; mod=number1%number2; cout<<" The remainder of two numbers:"<<mod<<endl; return 0; }
Output:
Enter First number :12 Enter the second number:5 The remainder of two numbers:2