Question

Find a div m and a mod m when a= 27;m = 4 a = 400; m = 16 a = 23; m = 34

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

a div m will give the integer part after dividing a by m and

a mod m will give the reminder after m divides a.

So,

for a=27; m=4

a div m = 6

a mod m = 3

for a=400; m=16

a div m = 25

a mod m = 0

for a=23; m=34

a div m = 0

a mod m = 23

The results can be obtained by a simple code too.

A simple c++ code is written for the above-mentioned problems:

Code:

#include <iostream>

using namespace std;

int main()
{
cout << 27/4 << " " << 27%4 << endl;
cout << 400/16 << " " << 400%16 << endl;
cout << 23/34 << " " << 23%34 << endl;
}

Screenshot of the code along with the output is attached below:

Note: '%' denoted mod and '/' denotes div

#include <iostream> using namespace std; int main) < endl; < endl; < endl; << 27%4 << 400%16 cout< 27/4 << 11 11 11 cout << 46 3 25 0 0 23

Add a comment
Know the answer?
Add Answer to:
Find a div m and a mod m when a= 27;m = 4 a = 400;...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT