Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. using System;
  2.  
  3. namespace JudjeTestssss
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int num = int.Parse(Console.ReadLine());
  10.  
  11.  
  12. int a = num % 10;
  13. int b = num / 10 % 10;
  14. int c = num / 100;
  15.  
  16. var result1 = a * b * c;
  17. var result2 = a + b + c;
  18. var result3 = a * b + c;
  19. var result4 = a + b * c;
  20.  
  21. Console.WriteLine(Math.Max(Math.Max(result1,result2),Math.Max(result3,result4)));
  22.  
  23.  
  24.  
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement