Variable Data DataTypes
//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);
Leave a Comment