Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package a_2;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner s = new Scanner(System.in);
- double betrag = s.nextDouble();
- double a = betrag%500;
- double b = a%200;
- double c = b%100;
- double d = c%50;
- double e = d%20;
- double f = e%10;
- double g = f%5;
- double h = g%2;
- double i = h%1;
- double j = i%0.5;
- double k = j%0.2;
- double l = k%0.1;
- double m = l%0.05;
- double n = m%0.02;
- double o = n%0.01;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement