Level 2 - Selections 0 of 9 activities solved
  1. Ride height Not yet solved
  2. Largest number Not yet solved
  3. Seasons Not yet solved
  4. States of water Not yet solved
  5. HTTP status codes Not yet solved
  6. Currency converter Not yet solved
  7. Nitrate Not yet solved
  8. Exam grade Not yet solved
  9. Periodic table Not yet solved
Next series Level 3 - Condition controlled repetitions
Level 2 - Selections

Ride height

Sign in to hand in your solution and get feedback.

// 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."); } } }