@@ -0,0 +1,1301 @@
+package tomas.ochoa;%0D%0Aimport java.util.Scanner;%0D%0A%0D%0A/**%0D%0A * The video game machines at your local arcade output coupons according to how%0D%0A * well you play the game. You can redeem 10 coupons for a candy bar or 3 coupons%0D%0A * for a gumball. You prefer candy bars to gumballs. Write a program that defines a%0D%0A * variable initially assigned to the number of coupons you win. Next, the program%0D%0A * should output how many candy bars and gumballs you can get if you spend all of%0D%0A * your coupons on candy bars first, and any remaining coupons on gumballs.%0D%0A *%0D%0A * candybar = 10 coupons%0D%0A * gumball = 3%0D%0A *%0D%0A */%0D%0Apublic class CouponOptimizer%0D%0A%7B%0D%0A    public static void main(String%5B%5D args)%0D%0A    %7B%0D%0A        // For calculating%0D%0A        int candyBar = 10;%0D%0A        int gumBall = 3;%0D%0A        int numCandyBars = 0;%0D%0A        int numOfGumBalls = 0;%0D%0A%0D%0A        // For input%0D%0A        Scanner keyboard = new Scanner(System.in);%0D%0A%0D%0A        // Request Input%0D%0A        System.out.print(%22Enter amount of coupons won: %22);%0D%0A        int coupons = keyboard.nextInt();%0D%0A%0D%0A        // Calculate shit%0D%0A        numCandyBars = coupons/candyBar;%0D%0A        numOfGumBalls = (coupons%25candyBar) / gumBall;%0D%0A%0D%0A        System.out.println(coupons + %22 can get you %22 + numCandyBars + %22 candy bars and %22 + numOfGumBalls + %22 gumballs.%22);%0D%0A    %7D%0D%0A%7D%0D%0A

Add PP1 Source