Skip to content
Advertisement

Shipping Charges calculator not producing the correct result

The following is a sample of a running program:

JavaScript

This is what I have so far:

JavaScript

how would I find the sum of all charges? And how would I be able to have the second question come after the cost?

So it would display:

JavaScript

Advertisement

Answer

I did not quite understand this statement how would I find the sum of all charges, but I solved your second question.

Here is the code:

JavaScript

eval() is not recommended for security reasons, so I changed it to float().

Let me know if you have any questions

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement