Advertisement
Guest User

Untitled

a guest
Oct 6th, 2019
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 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 MockUp_II_1.Game
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var list = Console.ReadLine()
  14. .Split()
  15. .Select(int.Parse)
  16. .ToList();
  17.  
  18. int firstExp = list[0] + list[1] + list[2];
  19. int secondExp = list[0] * list[1] * list[2];
  20. int thirdExp = list[0] + list[1] * list[2];
  21. int forthExp = list[0] * list[1] + list[2];
  22.  
  23. if (firstExp >= secondExp && firstExp >= thirdExp && firstExp >= forthExp)
  24. {
  25. Console.WriteLine(firstExp);
  26. }
  27.  
  28. else if (forthExp >= firstExp && forthExp >= secondExp && firstExp >= thirdExp)
  29. {
  30. Console.WriteLine(forthExp);
  31. }
  32.  
  33. else if (secondExp >= firstExp && secondExp >= thirdExp && secondExp >= forthExp)
  34. {
  35. Console.WriteLine(secondExp);
  36. }
  37.  
  38. else if (thirdExp >= firstExp && secondExp >= forthExp && thirdExp >= forthExp)
  39. {
  40. Console.WriteLine(thirdExp);
  41. }
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement