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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...