Untitled

mail@pastecode.io avatar
unknown
plain_text
5 months ago
530 B
0
Indexable
public class sumdiffquad {
    public static void main(String[] args){
        int x = Integer.parseInt(args[0]);
        int y = Integer.parseInt(args[1]);
      
        int sum = x + y;
       
        int diff = x - y;
        
        int product = x*y;
      
        int quot = x/y;
      
        int remai = x%y;
        System.out.printf("The Result of operations on %d and %d are:\nSum = %d\nDifference = %d\nProduct = %d\nQuotient = %d\nRemaider = %d", x, y, sum, diff, product, quot, remai);
    }
}
Leave a Comment