mercredi 7 octobre 2020

What is missing part in Conditional Statement code

Write a program that reads an integer entered by the user and checks if it is below 100, between 100 and 200 or more than 200. Print messages accordingly,

using System;

namespace thousandToTwoHundret
{
    class Program
    {
        static void Main(string[] args)
        {
            int chek = int.Parse(Console.ReadLine());
            if (chek < 100)
            {
                Console.WriteLine("Less than 100");
            }
            else if ( chek >= 100)
            {
                Console.WriteLine("Between 100 and 200");
            }
           
           else  
            {
                Console.WriteLine("Greater than 200");
            }
           


        }
    }
}

Aucun commentaire:

Enregistrer un commentaire