This program demonstrates how to find the quotient and remainder of a division operation between two numbers. It prompts the user to input two numbers and then calculates and displays their quotient and remainder.
#include <stdio.h>
int main() {
int dividend = 10, divisor = 3;
int quotient, remainder;
quotient = dividend / divisor;
remainder = dividend % divisor;
printf("Quotient: %d
", quotient);
printf("Remainder: %d
", remainder);
return 0;
}
#include <iostream>
using namespace std;
int main() {
int dividend = 10, divisor = 3;
int quotient, remainder;
quotient = dividend / divisor;
remainder = dividend % divisor;
cout << "Quotient: " << quotient << endl;
cout << "Remainder: " << remainder << endl;
return 0;
}
dividend = 10
divisor = 3
quotient = dividend // divisor
remainder = dividend % divisor
print("Quotient:", quotient)
print("Remainder:", remainder)
public class QuotientAndRemainder {
public static void main(String[] args) {
int dividend = 10, divisor = 3;
int quotient, remainder;
quotient = dividend / divisor;
remainder = dividend % divisor;
System.out.println("Quotient: " + quotient);
System.out.println("Remainder: " + remainder);
}
}