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

Bob sold 5 toaster ovens and 3 blenders for $500. if a blender is $20 less than a toaster oven, how much is a blender?
In , the Communists expelled the Nationalists from the mainland.
Where do most earthquakes occur? A. near plate boundaries B. near the tropics C. near mountains D. near oceans
Which sentence best describes mass movement? A. The downhill movement of animals due to heavy snow in their normal home b. The movement of people from New Jers
Malachai is doing a 20 miles bike ride. He has cycled 11 miles so far. What percentage of the the total distance has he cycled
A practice consisting of two partners and two associates is called a _______ practice. A. merged B. private C. general D. group
You can enhance the relationships you have with family members through positive communication. a. True b. False
Which of the following is a student association that can help you build leadership skills? a. MSDS b. DECA c. FDA d. FTC
One of Saturn's satellites revolves in a _____ motion. intergrade retrograde metronome revolving
what events are most likely to occur on a transform boundary