Advertisement
BojidarDosev

nai golqmo chislo ot fail

Oct 28th, 2021
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 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. using System.IO;
  7.  
  8. namespace ConsoleApp19
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14. string max = "";
  15. string s;
  16. StreamReader read = new StreamReader("D:\\numbers.txt");
  17. while (!read.EndOfStream)
  18. {
  19. s = read.ReadLine();
  20. if (max.CompareTo(s) == -1) max = s;
  21. }
  22. Console.WriteLine(max);
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement