-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathURI_1018.java
More file actions
29 lines (23 loc) · 806 Bytes
/
URI_1018.java
File metadata and controls
29 lines (23 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
int notes, aux;
Scanner sc = new Scanner(System.in);
notes = sc.nextInt();
System.out.printf("%d\n", notes);
System.out.printf("%d nota(s) de R$ 100,00\n", notes / 100);
aux = (notes % 100);
System.out.printf("%d nota(s) de R$ 50,00\n", aux / 50);
aux = (aux % 50);
System.out.printf("%d nota(s) de R$ 20,00\n", aux / 20);
aux = (aux % 20);
System.out.printf("%d nota(s) de R$ 10,00\n", aux / 10);
aux = (aux % 10);
System.out.printf("%d nota(s) de R$ 5,00\n", aux / 5);
aux = (aux % 5);
System.out.printf("%d nota(s) de R$ 2,00\n", aux / 2);
aux = (aux % 2);
System.out.printf("%d nota(s) de R$ 1,00\n", aux / 1);
}
}