Variable Data DataTypes
Mystic
java
10 months ago
406 B
3
Indexable
//Calculatte the pen,pencil,eraser cost with 18% gst
float pencil = scan.nextFloat();
float pen = scan.nextFloat();
float eraser = scan.nextFloat();
float gst = 0.18f;
float totalCost = pencil + pen + eraser;
float totalCostWithGst = totalCost + (totalCost * gst);
System.out.println("Total cost of items (after adding 18% GST): " + totalCostWithGst);Editor is loading...
Leave a Comment