Computer Applications
We have two variables x and y. Write Java statements to calculate the result of division of y by x and calculate the remainder of the division.
Java Operators
ICSE 2005
18 Likes
Answer
int quotient = y / x;
int remainder = y % x;
Answered By
12 Likes
Related Questions
State whether the following statement is True or False :
The output of System.out.println(1==1); is true.
State whether the following statement is True or False :
Explicit type conversion is also known as coercion.
Assign the value of pi (i.e., 3.142) to a variable with requisite data type.
What are logical operators? Give an example of each.