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

Which of the following describes why the atomic bomb was used to end WWII?(1 point) Allied officials were trying to avoid having to invade Japan since Japan wou
You're at 34 degrees north and 118 degrees west. You go north 10.9 degrees and west 80.3 degrees. What's your new location?
which metal is used to make coin amd for packaging​
find the missing angle measure of the following figure​
What was the attitude of African American soldiers returning from war?
4. Which of the following is an example of a literary medium? short story plot audio recording poem Brainliest!!!!!!!!
how many protons would the element with the atomic number 10 contain?
Write the equation of each line in slope-intercept form
How did economic systems change during the age of exploration? help due in 20 mins
what is the purpose of the great green wall