write a program to assign an integer variable with 65 and find out the quotient and remainder after diving the integer by 7 . Print the integer number, quotient and remainder
Answers
▶ We need to create a program to assign an integer variable with 65 and find out the quotient and remainder after diving the integer by 7 .
public class QuotientAndRemainder {
public static void main(String[] args)
{
int dividend = 65, divisor = 7;
int quotient = dividend / divisor;
int remainder = dividend % divisor;
System.out.println("The Quotient is = " + quotient);
System.out.println("The Remainder is = " + remainder); } }
- The Quotient is = 9
- The Remainder is = 2
The quotient & remainder in integer number.
_____________________________________
Answer:
We need to create a program to assign an integer variable with 65 and find out the quotient and remainder after diving the integer by 7 .
\mathtt{\huge{\underline{\red{Programme:-}}}}
Programme:−
public class QuotientAndRemainder {
public static void main(String[] args)
{
int dividend = 65, divisor = 7;
int quotient = dividend / divisor;
int remainder = dividend % divisor;
System.out.println("The Quotient is = " + quotient);
System.out.println("The Remainder is = " + remainder); } }
\mathtt{\huge{\underline{\green{Output:-}}}}
Output:−
The Quotient is = 9
The Remainder is = 2
The quotient & remainder in integer number.