Answer to Question #14124 in C++ for kajol

Question #14124
Write a program to read two numbers and print their quotient and remainder.
1
Expert's answer
2012-09-04T11:17:40-0400
#include <iostream>
using namespace std;

int main()
{

int a, b;
cout << "Please input a:" << endl;
cin
>> a;
cout << "Please input b:" << endl;
cin
>> b;

cout << "quotient c = " << (int) (a / b)
<< endl;
cout << "remainder d = " << a % b <<
endl;

return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS