Advertisement
didito33

MaxNumber

May 9th, 2021
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. using System;
  2.  
  3. namespace HelloSoftUni
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. string input = Console.ReadLine();
  10. double max = double.MinValue;
  11. while (input != "Stop")
  12. {
  13. double number = double.Parse(input);
  14. if (max < number)
  15. max = number;
  16. input = Console.ReadLine();
  17. }
  18. Console.WriteLine(max);
  19. }
  20.  
  21. }
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement