Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. 5. Намиране на по-голямото число
  2. Да се напише програма, която чете две цели числа, въведени от потребителя, и отпечатва по-голямото от
  3. двете.
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9.  
  10. namespace Greater_Number
  11. {
  12. class Program
  13. {
  14. static void Main(string[] args)
  15. {
  16. Console.WriteLine("Enter two integers: ");
  17. int num1 = int.Parse(Console.ReadLine());
  18. int num2 = int.Parse(Console.ReadLine());
  19. if (num1 > num2)
  20. Console.WriteLine("Greater number: " + num1);
  21. else if (num1 < num2)
  22. Console.WriteLine("Greater number: " + num2);
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement