Advertisement
Hexagram1209

bil

Jan 16th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.81 KB | None | 0 0
  1. import java.util.Arrays;
  2. public class test {
  3.     //global variable
  4.     static double denom[] = {100, 50, 25, 10, 5, 1, 0.25, 0.10, 0.05, 0.01};
  5.     public static void main() {
  6.         int bills[] = billsCalculator(387.41);
  7.         System.out.println(Arrays.toString(bills));
  8.     }
  9.     public static int[] billsCalculator(double x) {
  10.         //rounds off to nearest cent
  11.         x = ((int)(x * 100) / 100.0);
  12.         int bills[] = new int[10];
  13.         //CONTINUE BELOW
  14.        
  15.        
  16.        
  17.        
  18.        
  19.        
  20.        
  21.        
  22.        
  23.        
  24.        
  25.        
  26.        
  27.        
  28.        
  29.        
  30.        
  31.        
  32.        
  33.        
  34.        
  35.        
  36.        
  37.        
  38.        
  39.        
  40.        
  41.        
  42.        
  43.        
  44.        
  45.        
  46.        
  47.        
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement