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]
4 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]4 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
How can I make a website login system with only using php?
Kipish [7]
Please Note the Definition Of php please
5 0
4 years ago
Over time, smart phones have become _____.
-BARSIC- [3]
I think the answer is the 2nd one
7 0
3 years ago
Read 2 more answers
You install a new driver, but your device still doesn't work. What is the first thing you should do?
Lina20 [59]

restart the computer then contact customer service

7 0
3 years ago
Engineers and scientists redesign a prototype if it does not work correctly true or false and why
Rasek [7]
True they would not start to use a product if it would not work
Hope this helps please mark this as brainliest answer
4 0
4 years ago
Read 2 more answers
Which option is correct??
Andru [333]

Answer:

a

Explanation:

intercultural communication is about enganging oneself within a social enviroment of foreign culture and different races among it.

3 0
4 years ago
Other questions:
  • Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meters. INPUT and
    8·1 answer
  • Unlike the String class where you must pass a message to an object (instance) of the class, as in x.length( ), in order to use e
    12·1 answer
  • Write the simplest statement that prints the following on a single line: 3 2 1 Go! Note: Whitespace (blank spaces / blank lines)
    11·1 answer
  • To what type of user does he most likely have access? Jae is using a computer at the public library to do research she's able to
    9·1 answer
  • The program asks the user to enter the time the call is made (day, evening, or night) and the duration of the call (a number tha
    5·1 answer
  • Two threads try to acquire the same resource at the same time and both are blocked. Then, they continually change their states i
    14·1 answer
  • What is the bit pattern (raw binary) of the single precision representation of the decimal number 0.125 following IEEE 754 stand
    9·1 answer
  • Create a parent class called Shape with width and height parameters of type double and a function that returns the area of the s
    12·1 answer
  • Wake up to reality. Nothing ever goes as planned in this world. The longer you live,the more you realize that only pain, sufferi
    5·1 answer
  • HELPPP I cand find my sound card/driver on my computer, and I cant hear anything, I have tried to update the audio driver, but w
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!