Advertisement
porteno

Y_Q1

Dec 7th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1.  
  2. public class Q1 {
  3.  
  4. public static void main(String[] args) {
  5. int a = 2, b = 5;
  6. if(a*b>0)
  7. {
  8. if(a>b)
  9. System.out.println(a%b);
  10. else
  11. System.out.println(b%a);
  12. }
  13. else
  14. {
  15. if(a%2==0 && b%2==0)
  16. System.out.println(a/2+" "+b/2);
  17. else
  18. System.out.println(a*b/2);
  19. }
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement