Write a program to enter a number, calculate and print the quotient and remainder after dividing by 5? The answer should be in Java language
Answers
Answered by
0
Explanation:
import java.util.*;
class number
{
public static void main(String args[])
{
int n, q, r;
Scanner scr=new Scanner(System.in);
System.out.println("Enter the number");
n=scr.nextInt();
q=n/5;
r=n%5;
System.out.println("Quotient="+q);
System.out.println("Remainder="+r);
}
}
Pls mark it as brainliest
Similar questions