C++ Arithmetic Operator Finding the Remainder Between Two Numbers

Description

C++ Arithmetic Operator Finding the Remainder Between Two Numbers

#include <iostream> 
using namespace std; 
  
int main(int argc, const char * argv[]) 
{ 
        cout << "Enter your first number: " << endl; 
        int number1 = 0; 
        cin >> number1; /*from  www  .  ja va2  s.  co  m*/
  
        cout << "Enter your second number: " << endl; 
        int number2 = 0; 
        cin >> number2; 
  
        int result = number1 % number2; 
        cout << "The remainder from dividing your second number into your first is: " 
                << result << endl; 
        return 0; 
}



PreviousNext

Related