00:01
Hello, for problem 12 in chapter 4, you're asked to write a program that will prompt the user to enter an integer and then to check whether or not that integer is divisible by 5, 6 or both.
00:15
So we'll start by receiving the integer by denoting that integer as number and evaluating the input by the user, where we prompt the user by printing and enter an integer.
00:30
Then we need to check if it's divisible by five or six.
00:33
So div by five is going to be number, the modulo five is equal to zero.
00:39
If that's true, then div by five will be true.
00:42
If that's false, div by five will be false.
00:45
And same for six.
00:47
And then to display the results, we want to print out the questions, is number divisible by five and six? is number divisible by five or six? and is number divisible by five or six, but not both? and after each of those questions, we're going to print out for divisible by five and a six, we need div by five and div by six to be true.
01:10
For divisible by five or six, we need div by five or div by six to be true.
01:15
And if divisible by five or six, but not both, we need div by five or div by six to be true and not div by five and div by six to be true.
01:28
So let's go ahead and try some numbers.
01:32
We'll first start by a number that is divisible by five but not six.
01:36
So we see 15 is divisible by five and six...