So the issue is I need to add 10 dollars for every 500 miles a product is shipped.
So I came up with this:
milesPricing = (miles/ 500) * 10
But I have to add 10 even if it's not 500 miles, for example, if they travel 700 miles, I'd need to add 10 for the first 500 and ten more cause the total goes over five hundred. How do I program this? I kept thinking for loop, but that would make me create an infinite loop to represent all possibilities unless I limit the loop and I doubt I can do this for the assignment.
Thank you.