Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. namespace Tester
  2. {
  3. class Program
  4. {
  5. static void Main(string[] args)
  6. {
  7. int[] Tol = { 98, 106, 214 };
  8. int k=0;
  9. for (int i = 0; i < Tol.Length; i++)
  10. if (Tol[i] < 718 && Tol[i] > 94)
  11. {
  12. if (Tol[i] > Tol[i + 1] && Tol[i] > Tol[i + 2])
  13. {
  14. k = Tol[i];
  15. }
  16. else if (Tol[i+1] > Tol[i] && Tol[i+1] > Tol[i + 2])
  17. {
  18. k = Tol[i+1];
  19. }
  20. else
  21. {
  22. k = Tol[i + 2];
  23. }
  24. }
  25. Console.WriteLine(k);
  26.  
  27. Console.ReadLine();
  28.  
  29.  
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement