Sign in to test your solution.
// Ride height program using System; class Submission { // ------------------------- // Subprograms // ------------------------- static bool valid_height(double height) { if (height > 104) { return true; } else { return false; } } // ------------------------- // Main program // ------------------------- public static void Main(string[] args) { Console.WriteLine("Enter the height of the person in cm:"); double height = Convert.ToDouble(Console.ReadLine()); if (valid_height(height)) { Console.WriteLine("Height OK."); } else { Console.WriteLine("Sorry, you are too small."); } } }
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.