1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Wittaler [7]
4 years ago
8

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

Computers and Technology
1 answer:
meriva4 years ago
3 0

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.

You might be interested in
The permissions of a file in a Linux system are split into three sets of three permissions: read, write, and execute for the own
Reptile [31]

Answer:

Explanation:

def octal_to_string(octal):

   result = ''

   value_letters = [(4, 'r'), (2, 'w'), (1, 'x')]

   for c in [int(n) for n in str(octal)]:

       for value, letter in value_letters:

           if c >= value:

               result += letter

               c -= value

           else:

               result += '-'

   return result

print(octal_to_string(755))

print(octal_to_string(644))

print(octal_to_string(750))

print(octal_to_string(600))

**************************************************

7 0
3 years ago
Which option describes a balanced slide?
Umnica [9.8K]

Answer: a slide with a size 18 font and five images

Explanation:

the text isnt that big to overpower the images and vise versa

4 0
3 years ago
On the 74ls74 d flip-flop, the clk input has a small triangle. the pr (preset) and clr (clear) inputs have a circle. what do the
topjm [15]
The triangle indicates that the clock signal is an edge-triggered signal.
The circle indicates that the signal is low-active (ie., inverted).
The 74LS74 has a positive-edge trigger clock (low to high).
7 0
4 years ago
Why do you think viruses are called “viruses”? What do they have in common with the living viruses that cause diseases in humans
Vinvika [58]

Answer:

Computer viruses are referred to living viruses as they both have similar effects.

Explanation:

While living viruses invade cells and cause harmful effects on the body, computer viruses basically do the same thing. Computer viruses are a malicious code that inserts itself into a computer. It's designed to spread to one computer to another, just like a living virus.

Similarities:

  • Spreads from one host to another.
  • They both alter/harm the host.
  • Both can replicate itself.

Differences:

  • A computer virus is manmade, while living viruses aren't.
  • A computer virus needs to be removed manually through an app or software while living viruses are almost curable medicine.
  • A computer virus effects machines and software while living viruses only infect living organisms.
5 0
3 years ago
Read 2 more answers
Hey i need someone to talk to because of life it would be amazing if you can help me
Leya [2.2K]
Talk to you about... :)
3 0
3 years ago
Other questions:
  • To support an internet client, you must have six elements. the first three -- a computer, an operating system and tcp/ip -- are
    7·1 answer
  • The times per second an audio file is converted from analog to digital is the ______. audio file format bandwidth sample rate wa
    5·2 answers
  • What is the purpose of system calls, and how do system calls relate to the OS and to the concept of dual-mode (kernel-mode and u
    14·1 answer
  • How does a hard drive work?
    5·1 answer
  • Find and fix the error in the if-else statement. import java.util.Scanner;
    11·2 answers
  • Www.microsoft.com is an example of this (two words) (last letter is e) and has to be (10 letters)
    10·1 answer
  • 7.3 A hydraulic lift has a mechanical advantage of 6. If the load weighs 780 N, calculate
    13·1 answer
  • Pls answer 10 points ​
    10·2 answers
  • Pls say correct guyz pls pls pls
    7·1 answer
  • When a support agent does not know the answer to a question, a good incident management strategy is to tell the user ____.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!