Radost09

Grades

Feb 16th, 2019
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.93 KB | None | 0 0
  1. using System;
  2.  
  3. namespace P02_Grades
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double grades = double.Parse(Console.ReadLine());
  10.  
  11.             PrintInWords(grades);
  12.         }
  13.  
  14.         private static void PrintInWords(double grades)
  15.         {
  16.             if (grades >= 2.0 && grades < 3.0)
  17.             {
  18.                 Console.WriteLine("Fail");
  19.             }
  20.             if (grades >= 3.0 && grades < 3.50)
  21.             {
  22.                 Console.WriteLine("Poor");
  23.             }
  24.             if (grades >= 3.50 && grades < 4.50)
  25.             {
  26.                 Console.WriteLine("Good");
  27.             }
  28.             if (grades >= 4.50 && grades < 5.50)
  29.             {
  30.                 Console.WriteLine("Very good");
  31.             }
  32.             if (grades >= 5.50 && grades <= 6.0)
  33.             {
  34.                 Console.WriteLine("Exellent");
  35.             }
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment