kb24 0 Posted May 16, 2009 Report Share Posted May 16, 2009 (edited) From code below where is the error? And where to do the correction?public class AddCash{ public static void main(String[]args){ int fivecents = 2; int tencents = 1; int twentycents = 5; int fiftycents = 3; int onedollar = 2; int twodollar = 1; System.out.println("fivecents:"0.05*2); System.out.println("tencents:"0.10*1); System.out.println("twentycents:"0.20*5); System.out.println("fiftycents:"0.50*3); System.out.println("onedollar:"1.00*2); System.out.println("twodollar:"2.00*1); System.out.println("Total=:"0.05*2 + 0.10*1 + 0.20*5 + 0.50*3 + 1.00*2 + 2.00*1); System.out.println("Thank You for using the coin additiion program"); }} Edited May 16, 2009 by KB24 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.