Computer Science, asked by adhritchopdekar, 3 months ago

WAP to either print quotient of 2 numbers or remainder of 2 numbers.

Prototype: void setdata(char ch, int num1, int num2)

(I/ set the datat) int quo( ) {//to return quotient) int rem( X// to return remainder) void main() {if ch='1' call quo() if 2 call rem() and print)

don't spam, I'll report irrelevant answers
I'll mark BRAINLIEST to correct answer ​

Answers

Answered by skb08091997
1

Explanation:

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);

}

output

Quotient = 6

Remainder = 1

In the above program, we have created two variables dividend and divisor. Here, we are calculating the quotient and remainder by dividing 25 by 4.

To find the quotient, we have used the / operator. We have divided dividend (25) by divisor (4). Since both dividend and divisor are integers, the result will also be integer.

Answered by maraheem724
0

Answer:

hello blink ur ans are very nice

Similar questions