@@ -0,0 +1,761 @@
+import java.util.Scanner; // initialize scanner%0Apublic class efficientCoinCounter%0A%7B%0A%0A/*%0AEfficiency:%0A1) no need for counting pennies 1-4%0A2) should exit loop if total %3E 100%0A*/%0A%0Apublic static void main( String%5B%5D args )%0A%7B%0Aint combinations = 0;%0Afor ( int q = 0; q %3C= 4; q++ )%0A%7B%0Afor ( int d = 0; d %3C= 10; d++ )%0A%7B%0Afor ( int n = 0; n %3C= 20; n++ )%0A%7B%0Afor ( int p = 0; p %3C= 100; p++ )%0A%7B%0Aif(p + (n*5) + (d*10) + (q*25) == 100)%0A%7B%0ASystem.out.printf( %22%25d Pennies, %25d Nickels, %25d Dimes, %25d Quarters%22, p, n, d, q );%0ASystem.out.println();%0Acombinations++;%0A%7D // end if%0A%7D // end end penny%0A%7D // end end nickel%0A%7D // end dime%0A%7D // end quarter%0ASystem.out.println();%0ASystem.out.printf(%22There were %25d combinations. %22, combinations);%0A%7D // end method main%0A%0A%7D // end class PythagoreanTriple%0A

Create efficientCoinCounter.java