My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 19 attachment: Division.java (527 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

import java.util.*;
public class Division {

private static Scanner scanner;

public static void main(String[] args){
scanner = new Scanner(System.in);
System.out.println("Input dividend : ");
int dividend = scanner.nextInt();
System.out.println("Input divisor : ");
int divisor = scanner.nextInt();
int quotient = dividend/divisor;
System.out.println(dividend + "/" + divisor);
System.out.println("Quotient: " + quotient);
System.out.println("Rest: " + dividend%divisor);


}

}
Powered by Google Project Hosting