Akshith wants to find the remainder using C++ program. Explain
him which operator will help in finding the remainder of a division
with an example.
Answers
Answered by
3
Answer:
Explanation:
int main()
{
int divisor, dividend, quotient, remainder;
cout << "Enter dividend: ";
cin >> dividend;
cout << "Enter divisor: ";
cin >> divisor;
quotient = dividend / divisor;
remainder = dividend % divisor;
cout << "Quotient = " << quotient << endl;
cout << "Remainder = " << remainder;
return 0;
}
Similar questions
Physics,
3 months ago
Science,
3 months ago
Chemistry,
3 months ago
Science,
6 months ago
World Languages,
11 months ago