oforipadmore6 oforipadmore6
  • 10-02-2021
  • Computers and Technology
contestada

Write an algorithm to show whether a given number is even or odd.

Respuesta :

Shteynsenberg Shteynsenberg
  • 10-02-2021

Answer:

int num = Console.ReadInt("Please enter a number");

if(num%2 == 0) {

Console.WriteLine("Number is even");

} else {

Console.WriteLine("Number is odd");

Explanation:

Answer Link

Otras preguntas

The term for two triangles that are congruent after a dilation is?
true or false In the world war 2 the us fought with Hitler to defeat England
The position-time graph of an object is found to be a straight line passing through the origin. What information about the motion of the object is provided by t
My teacher wouldn't help me.. and this is my last question. I need to know how to find the perimeter of the geometric figure (it's a parallelogram) The sides ar
1a  katie has a high metabolic rate. olivia`s metabolic rate is lower. olivia is jealous of katie because katie can eat more food than olivia without putting on
If the merry-go-round makes one revolution in 10 seconds, what is the child’s linear speed?
write 1.25 as a fraction or a mixed number
Explain why the microscope changed the course of scientific research.
which is the solution for this ordered inequality x+y≥0 is the answer (-1,0),(0,-1),(1,-1),(-2,1)
How do you solve 1.1x + 1.2 - 5.4 = -10