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
Lisa [10]
3 years ago
7

Write an algorithm which gets a number A, if it is even, prints even, and if it is odd prints odd.

Computers and Technology
1 answer:
juin [17]3 years ago
7 0

Answer:

The algorithm to find A is even or odd.

  1. input A.
  2. Check the remainder on diving by 2 by A%2.
  3. If remainder is 1 then A is odd Print(Odd).
  4. If remainder is 0 print(Even).

Explanation:

To check if the number is even or odd we use modulo  operator(%).Which gives the remainder on dividing.So if we do this A%2 it will give the remainder that will come out on dividing the value of A by 2.

So if the remainder comes out is 1 then the number is odd and if the remainder is 0 then the number is odd.

You might be interested in
I am buying a BluRay drive access time is 180ms and the other is 210ms(BD-ROM) whats does access time mean
kkurt [141]
It means how fast it can read the disk so if you want faster data transfer you would go for blurry if you really don't care go for the other one
6 0
3 years ago
Clive wants to write a query that will display the names of the students who scored less than 10 in their final exams. Which num
Mice21 [21]
I'd go for <span>FLOOR(x)
</span>

The numerical function FLOOR(x) can be used to return the largest integer value that is less than or equal to the numerical expression provided. The numerical function CEILING (x) is the opposite of FLOOR(x) since it gives the smallest integer value that is greater or equal to the numerical expression.






6 0
3 years ago
Read 2 more answers
True or false? Resistors regulate and limit electrical current. A. True B. False
Vikki [24]
Hello! I believe the answer for this is "True"!
3 0
3 years ago
Read 2 more answers
How are special characters added to a Word document? Check all that apply.
MrRissso [65]

It kinda depends on what you mean by special characters

7 0
3 years ago
Read 2 more answers
Which programming languages are the best choices for desktop applications? Select 3 options.
slega [8]
The three are Python c and html
5 0
3 years ago
Read 2 more answers
Other questions:
  • A customer states that when she removes the printed pages from her laser printer output tray, the black ink smears all over her
    10·1 answer
  • What would be some long- term goals.
    11·1 answer
  • Illustrate the process of using an operating system to manipulate a computer’s desktop, files and disks.
    12·1 answer
  • One group of students did an experiment to study the movement of ocean water. The steps of the experiment are listed below.
    10·1 answer
  • URGENT!!! Which file format is used mainly in the Microsoft Windows operating system?
    15·2 answers
  • A workstation with a static IP (Internet Protocol) address can print and authenticate to a server, but cannot browse to www.comp
    14·1 answer
  • What is the alogarithm for solving the perimeter of a triangle
    11·1 answer
  • H e l p ASAP plz <br> and thanks
    9·1 answer
  • Is there a way for me to play a .mp3 file from my computer using Atom?
    10·1 answer
  • Rachelle is writing a program that needs to calculate the cube root of a number. She is not sure how to write the code for that
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!