VelizarAvramov

02. Passed or Failed

Jul 17th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. Modify the above program, so it will print "Failed!" if the grade is lower than 3.00.
  2. using System;
  3.  
  4. namespace _02._Passed_or_Failed
  5. {
  6.     class PassedOrFailed
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             double input = double.Parse(Console.ReadLine());
  11.  
  12.             if (input < 3.00)
  13.             {
  14.                 Console.WriteLine("Failed!");
  15.             }
  16.             else if (input >= 3.00)
  17.             {
  18.                 Console.WriteLine("Passed!");
  19.             }
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment