Print Quotient And Remainder Program Example using CPP

  1. Home
  2. Tutorials
  3. CPP
  4. CPP Programs
  5. Input Statement
  6. Program

Source Code

#include <iostream>

using namespace std;

int main(int argc, char** argv) {

    // Variable Declaration for input
    int dividend;
    int divisor;

   // Taking input in Variables
    cout<<"Enter Dividend: ";
    cout<<"Enter Divisor: ";

    // Pritnting Quotient and Remainder
    cout<<" Quotient = "<<dividend / divisor;
    cout<<"\n Remainder = " <<dividend % divisor;

    return 0;


find Quotient and Remainder


In this program two variables of int type are used, named as dividend and divisor. Dividend will be divided by divisor to get quotient. Again this dividend will get modulus by divisor to get remainder.

After declaration we will take input in these variables using cin statement and then get print quotien,remainder using cout statement.


Login to TRACK of Comments.