Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java An Introduction To Problem Solving And Programming

Authors: Walter Savitch

8th Edition

0134462033, 978-0134462035

More Books

Students also viewed these Programming questions

Question

7. Describe the binomial distribution.

Answered: 1 week ago

Question

9. Describe the Poisson distribution.

Answered: 1 week ago