Exam help. I have to solve a problem I have to solve and I do not how to

1st write a program that prompts the user to enter two integers and checks whether the first is divisible by the second.
Almost always the problems we have to solve are the problems we have to solve. I have personally never not had to solve a problem I had to solve, nor had to solve a problem I didn't have to solve. Furthermore, the times I didn't know how to solve a problem I had to solve I had to solve, I had to also solve the problem of finding out how to solve the problem I had to solve which, to top it all off, I had to solve!
It was quite aggravating.
mollywhoppinRBG wrote:
1st write a program ...

And second?
What is your problem?
Do you know how to read an int from the keyboard?

To check if a number is divisible by another you can use the modulo operator %.
For example 6 % 2 = 0
Thanks guy I was overthinking the problem greatly. It's just simple using cin and %
Topic archived. No new replies allowed.