distance=int(input("Enter the distence: ")) if distance >= 0 and distance <= 100: cost=5.00 elif distance > 100 and distance <= 500: cost=8.00 elif distance > 500 and distance <= 1000: cost=10.00 else: cost=12.00 print("The final cost is: ",cost)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question
Please provide the pseudocode for the program below
distance int(input("Enter the distence: "))
if distance >= 0 and distance <= 100:
cost=5.00
elif distance > 100 and distance <= 500:
cost=8.00
elif distance > 500 and distance <= 1000:
cost=10.00
else:
cost=12.00
print("The final cost is: ",cost)
Transcribed Image Text:distance int(input("Enter the distence: ")) if distance >= 0 and distance <= 100: cost=5.00 elif distance > 100 and distance <= 500: cost=8.00 elif distance > 500 and distance <= 1000: cost=10.00 else: cost=12.00 print("The final cost is: ",cost)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning