Jump to content

Addcash


kb24

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"); }}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...