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 area of a rectangular wall of a barn is 55 square feet. It's length is 6 feet longer than the width. Find the length and width of the wall of the barn.
'What is the surface area, in square inches, of an 8-inch cube? F. 512 G. 384 H. 320 J. 256 K. 192'
what organelles are found only in plants cells and bacterial cells
what is approximate rhyme?
what is approximate rhyme?
If x and y are real numbers such that x > 1 and y < −1, then which of the following inequalities must be true? A. x/y> 1 B. |s|^2 > |y| C. x/3− 5 &g
how can a cyclist minimize friction as he or she rides? A.by increasing the weight of the bike B.by increasing the trend on his or her tires C.by decreasing t
Two mechanics worked on a car. The first mechanic worked for 10 hours, and the second mechanic worked for 5 hours. Together they charged a total of $725. What w
Which of the following is equivalent to (5 /k) + ((k + 3) /(k + 5)) ? A. (k +8) /(2k + 5) B. (k + 8) /k(k + 5) C. 5(k + 3) /k(k + 5) E. (k^2+ 8k + 25) /k(k + 5)
John will be x in 7 years. How old was he last year? A: x + 7 B: 1 - x - 7 C: x + 8 D: x - 8