It feels like you should be asking the coin conversion question, with special attention to the loss of precision caused by double turning
Scanner input = new Scanner(System.in);
double a = input.nextDouble();
long aLong = Math.round((a * 100));
long b = aLong / 1000;
long c = aLong % 1000 / 500;
long d = aLong % 500 / 100;
long f = aLong % 100 / 50;
long j = aLong % 50 / 10;
long h = aLong % 10 / 2;
long i = aLong % 2;
System.out.println(b + " 张十元");
System.out.println(c + " 张五元");
System.out.println(d + " 张一元");
System.out.println(f + " 个五角");
System.out.println(j + " 个一角");
System.out.println(h + " 个贰分");
System.out.print(i + " 个壹分");