Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a java program that computes a ride you took in taxi. The bill computed based on an initial cost PLUS the taxi charge
Write a java program that computes a ride you took in taxi. The bill computed based on an initial cost PLUS the taxi charge of 0.5 dirham for every 0.2 km PLUS VAT amount. Your program should prompt the user to enter the initial cost, the distance of the ride, and define if the VAT is inclusive or not (the user enter 1 if it is inclusive and 0 otherwise). Sample Input/Output: Enter the initial cost: 10 Enter the distance of the ride: 20 Enter if the VAT is inclusive (1) or exclusive (0): 1 The total charge is: 63.0
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started