Vinchy
Vinchy Vinchy
  • 13-08-2020
  • Computers and Technology
contestada

write a pseudocode thats accept and then find out whether the number is divisible by 5 ​

Respuesta :

tonb
tonb tonb
  • 13-08-2020

Answer:

input number

calculate modulus of the number and 5

compare outcome to 0

if 0 then output "divisible by 5"

else output "not divisible by 5"

Explanation:

The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.

Answer Link

Otras preguntas

IF 2x3x4=24 then what is 6x4
Find the sum of the first 200 terms of the arithmetic sequence that begins: 12, 18, 24, ...
can anyone help me identify the center and radius on these 3 pls , brainly
my favorite food during lunchtime is___________The ingredients are = ____________________The procedures are = ________________________​
Identity the correct weight to the nearest 1/8 pound,then reduce the fraction if possible,which of the following would a scale be used to measure
Which of these is not an equation? A) 3b=5 B) 43(4x + 7y) C) 78 = 3p - 37 D) a - 17 = 1,825,026
The Brady Bill puts a waiting period on which of the following? A. handgun purchases B. rifle purchases C. explosives purchases
what is autocomplete
Write the equation of the line that passes through the point (1,−5) and with the slope of −3. Write the in slope-intercept form.
PLEASE HELP ASAPPP :)) IM GIVING BRAINLIEST + POINTS!! Pyramid A is a square pyramid with a base side length of 12 inches and a height of 8 inches. Pyramid B is