Take 1 number from user and explain this is divisible of 2 or not in C+
Answers
Answer:
follow me i will also follow u
Answer:
Summary Divisibility Rules
Page 1
Page 2
A number is divisible by another number if it can be divided equally by that number; that is, if it yields a whole number when divided by that number. For example, 6 is divisible by 3 (we say "3 divides 6") because 6/3 = 2, and 2 is a whole number. 6 is not divisible by 4, because 6/4 = 1.5, and 1.5 is not a whole number.
It is often useful to know whether a number divides another number. To check divisibility, one can always do the division out by hand and see if the result is a whole number. However, if the number we are dividing is large, this becomes very difficult. There are some divisibility rules which make this task much easier--these rules allow us to determine whether a number is divisible by another number without having to carry out the division.
Divisibility by 1
A number does not change when it is divided by 1. Therefore, every whole number is divisible by 1.
Divisibility by 2, 4, and 8
All even numbers are divisible by 2. Therefore, a number is divisible by 2 if it has a 0, 2, 4, 6, or 8 in the ones place. For example, 54 and 2,870 are divisible by 2, but 2,221 is not divisible by 2.
A number is divisible by 4 if its last two digits are divisible by 4. For example, 780, 52, and 80,744 are divisible by 4, but 7,850 is not divisible by 4. To check whether a number is divisible by 4, just divide the last two digits of the number by 4. If the result is a whole number, then the original number is divisible by 4.
A number is divisible by 8 if its last three digits are divisible by 8. For example, 880 and 905,256 are divisible by 8 but 74,513 is not divisible by 8. To check divisibility by 8, divide the last three digits of the number by 8. If the result is a whole number, then the original number is divisible by 8.