C# C# Basics If Statements "if" Statements

Amah Martin
Amah Martin
11,129 Points

My CheckSpeed code challenge response shows the correct output but Check Work states it's not correct.

Challenge:

Update the CheckSpeed method body: if the speed is over 55, CheckSpeed should print the message "too fast".

Program.cs
using System;

class Program
{

    static void CheckSpeed(double speed)
    {
        // YOUR CODE HERE
        if (speed > 55)
        {
            Console.WriteLine("Too fast");   
        }
    }

    static void Main(string[] args)
    {
        // This won't print anything.
        CheckSpeed(53);
        // This should print "too fast".
        CheckSpeed(88);
    }

}

2 Answers