Guest User

Untitled

a guest
Jan 21st, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace ResultCheckOcenkaArray
  5. {
  6. class Program
  7. {
  8. static void Main(string[] args)
  9. {
  10. double ocenka = 0.00D;
  11. var array = new[] { "poor", "average", "good", "very good", "excellent" };
  12. Nachalo:
  13. string input = Console.ReadLine();
  14. if (input.Length == 4 || input.Length == 1 )
  15. {
  16. if (double.TryParse(input, out ocenka))
  17. {
  18. if (ocenka >= 2.00 && ocenka <=6)
  19. {
  20. Console.WriteLine(array[(int)Math.Round(ocenka) - 2]);
  21. goto Nachalo;
  22. }
  23. goto Nachalo;
  24. }
  25. goto Nachalo;
  26. }
  27. goto Nachalo;
  28. }
  29. }
  30. }
Add Comment
Please, Sign In to add comment