Jump to content



Recommended Posts

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 by KB24
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...