Be careful with your wording: "all
types of data input" gives the impression that you are not only testing with valid input, but invalid input too (e.g., negative numeric input even though it does not make sense for shipping weight, alphabetic input even though the weight is numeric), but I do not see any code to handle invalid input, e.g., you do not check the result of scanf.
Based on the code that you have written, it looks like your misunderstanding lies at the level of understanding the problem, rather than with formulating an algorithm.
Take another look at what you wrote concerning the problem:
Weight - less than 10 = $2.00 per 500 miles
Weight - more than 10 = $4.50 per 500 miles
Weight - more than 50 = Does not ship
What this means is that you are dealing with four values:
- Weight: numeric input from the user
- Miles: numeric input from the user
- Cost per 500 miles: based on where the weight input falls into the weight ranges
- Total cost: (Miles / 500.0) * Cost per 500 miles, presumably rounded to two decimal places
So, the idea is to read the weight and miles from the user, then use if/else statements to determine the cost per 500 miles. You have to account for a weight more than 50, in which case perhaps you could set the cost per 500 miles to be negative, and use this to check if you should compute the total cost, or inform the user that the item does not ship.