Advertisement
Guest User

Max_number_pesho_odd

a guest
Feb 14th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Max_Number
  8. {
  9. class max_number
  10. {
  11. static void Main(string[] args)
  12. {
  13. Console.WriteLine("n=");
  14. var n = int.Parse(Console.ReadLine());
  15. var max = int.MinValue;
  16. for (var i = 0; i < n; i++)
  17. {
  18. var num = int.Parse(Console.ReadLine());
  19. if (num > max)
  20. {
  21. max = num;
  22. }
  23. Console.WriteLine(max);
  24. }
  25.  
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement