Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace P02_Grades
- {
- class Program
- {
- static void Main(string[] args)
- {
- double grades = double.Parse(Console.ReadLine());
- PrintInWords(grades);
- }
- private static void PrintInWords(double grades)
- {
- if (grades >= 2.0 && grades < 3.0)
- {
- Console.WriteLine("Fail");
- }
- if (grades >= 3.0 && grades < 3.50)
- {
- Console.WriteLine("Poor");
- }
- if (grades >= 3.50 && grades < 4.50)
- {
- Console.WriteLine("Good");
- }
- if (grades >= 4.50 && grades < 5.50)
- {
- Console.WriteLine("Very good");
- }
- if (grades >= 5.50 && grades <= 6.0)
- {
- Console.WriteLine("Exellent");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment