Computer Science, asked by vaishnavikalesh2277, 1 year ago

We have 2 variables x and y.Write Java statement to calculate the result of division of x and y and calculate the remainder of the division

Answers

Answered by zoyasultana
8

Answer:

public class QuotientRemainder {

public static void main(String[] args) {

int dividend = 25, divisor = 4;

int quotient = dividend / divisor;

int remainder = dividend % divisor;

System.out.println("Quotient = " + quotient);

System.out.println("Remainder = " + remainder);

}

}

Answered by pallavi1772004
7

Answer:

public class Division

{

public static void main(String args[])

{

int num=x;

int num=y;

int quotient=y/x;

int remainder=y%x;

System.out.println("quotient is :"+quotient);

System.out.println("remainder is:"+remainder);

}

}

Explanation:

Similar questions