Answered step by step
Verified Expert Solution
Question
1 Approved Answer
must be using c not c++ Task 1(Read Properly): You have to write a simple ride sharing (like Uber or Pathao) program in C language,
must be using c not c++
Task 1(Read Properly): You have to write a simple ride sharing (like Uber or Pathao) program in C language, but a miniature version. There are three types of transportation options - car, motorcycle and bicycle. The bill is calculated as follows: 1. Base fare (Every ride starts with this amount): a. Car: 50 Taka b. Motorcycle: 30 Taka c. Bicycle: 20 Taka 2. Distance fare: a. Car: 25 Taka/km b. Motorcycle: 15 Taka/km c. Bicycle: 10 Taka/km 3. Duration fare: 2 Taka/minute 4. Total fare = Base fare + Distance fare + Duration fare 5. Promo fare: Promo code is applied on the total fare. There can be two types of promo: 1. Flat: flat 50 taka discount 2. Percent: 10% discount Let's assume that we live in an ideal city where the vehicles move in a constant speed. . . Car: 60km/hour Motorcycle: 70km/hour Bicycle: 20km/hour . Input/Output: 1. User chooses a transportation option 2. User chooses the distance he/she wants to travel 3. The duration is calculated automatically. 4. Based on the user's chosen promo code, the promo fare is calculated. 5. At the end, user can see the grand total fare with break down as follows: Base fare: b taka Distance fare: d taka (dd KM) Duration fare: u taka (uu minutes) Total fare: t taka Promo fare: p taka (pp% or pp taka)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