Friday 1 December 2017

C sharp Program Average Height


Code:

using System;
class program
{
    public static void Main()
    {
        float height;
        Console.WriteLine("Enter  the Height (in centimeters) \n");
        height = int.Parse(Console.ReadLine());
        if (height < 150.0)
            Console.WriteLine("Dwarf \n");
        else if ((height >= 150.0) && (height <= 165.0))
            Console.WriteLine(" Average Height \n");
        else if ((height >= 165.0) && (height <= 195.0))
            Console.WriteLine("Taller \n");
        else
            Console.WriteLine("Abnormal height \n");
    }
}


Output:

Enter  the Height (in centimeters)
165
 Average Height


More C# Programs:




















100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...