Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Q1 {
- public static void main(String[] args) {
- int a = 2, b = 5;
- if(a*b>0)
- {
- if(a>b)
- System.out.println(a%b);
- else
- System.out.println(b%a);
- }
- else
- {
- if(a%2==0 && b%2==0)
- System.out.println(a/2+" "+b/2);
- else
- System.out.println(a*b/2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement