Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace JudjeTestssss
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num = int.Parse(Console.ReadLine());
- int a = num % 10;
- int b = num / 10 % 10;
- int c = num / 100;
- var result1 = a * b * c;
- var result2 = a + b + c;
- var result3 = a * b + c;
- var result4 = a + b * c;
- Console.WriteLine(Math.Max(Math.Max(result1,result2),Math.Max(result3,result4)));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement