fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int num1 = 60 ;
  13. int num2 = 50 ;
  14. int num3 = 68 ;
  15. int largest = 0;
  16. int secLargest = 0;
  17. if(num1 > num2){
  18. largest = num1;
  19. secLargest = num2;
  20. }
  21. else{
  22. largest = num2;
  23. secLargest = num1;
  24. }
  25. if(num3 > largest){
  26. largest = num3;
  27. secLargest = largest;
  28. }
  29. else if (num3 > secLargest)
  30. secLargest = num3;
  31. System.out.printf("%d",(largest + secLargest) % num1);
  32. }
  33. }
Success #stdin #stdout 0.1s 48464KB
stdin
Standard input is empty
stdout
30