public class change {
private static final double[] denominations = {10.0, 5.0, 1.0, .5, .25,
.1, .05, .01 };
public static void main(String[] args) {
double sum=15.38;
for(double d:denominations){
int num=(int)Math.floor(sum/d);
if(num!=0){
System.out.println(num+"*"+d+";");}
sum-=d*num;
}
}
}