Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MockUp_II_1.Game
- {
- class Program
- {
- static void Main(string[] args)
- {
- var list = Console.ReadLine()
- .Split()
- .Select(int.Parse)
- .ToList();
- int firstExp = list[0] + list[1] + list[2];
- int secondExp = list[0] * list[1] * list[2];
- int thirdExp = list[0] + list[1] * list[2];
- int forthExp = list[0] * list[1] + list[2];
- if (firstExp >= secondExp && firstExp >= thirdExp && firstExp >= forthExp)
- {
- Console.WriteLine(firstExp);
- }
- else if (forthExp >= firstExp && forthExp >= secondExp && firstExp >= thirdExp)
- {
- Console.WriteLine(forthExp);
- }
- else if (secondExp >= firstExp && secondExp >= thirdExp && secondExp >= forthExp)
- {
- Console.WriteLine(secondExp);
- }
- else if (thirdExp >= firstExp && secondExp >= forthExp && thirdExp >= forthExp)
- {
- Console.WriteLine(thirdExp);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement