MrAlex

Untitled

Oct 10th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1.         9.
  2.           int max = int.MinValue,min = int.MaxValue;
  3.           int num = int.Parse(Console.ReadLine());
  4.             while(num >= 0)
  5.             {
  6.                 if (max < num)
  7.                 {
  8.                     max = num;
  9.                 }
  10.                 if (min > num)
  11.                 {
  12.                     min = num;
  13.                 }
  14.                 if (num >= 95)
  15.                 {
  16.                     Console.WriteLine(num + " great");
  17.                 }
  18.                 else if(num <= 55)
  19.                 {
  20.                     Console.WriteLine(num + " failed");
  21.                 }
  22.                 num = int.Parse(Console.ReadLine());
  23.             }
  24.             Console.WriteLine(max);
  25.             Console.WriteLine(min);
Advertisement
Add Comment
Please, Sign In to add comment