Computer Science, asked by adfrt, 11 months ago

Write a program in java to accept two numbers and display their reminder while the greater number is divided by the smaller number

Answers

Answered by Anonymous
6

import java.util.*;

public class Reminder

{

public static void main(String args[])

{

Scanner in= new Scanner(System.in);

int a,b,c,d,e;

System.out.println("Enter the two numbers");

a=in.nextInt();

b=in.nextInt();

c=Math.max(a,b);

d=Math.min(a,b);

e=c%d;

System.out.println("Display the reminder"+e);

}

}

Answered by mustafa3952
0

Answer:

public static void main(String[] args)

{

double a = 5, b = 2;

while (a >= b) {

a -= b;

}

System.out.println(a);

}

Similar questions