Langkawi Ro-Ro Ferry Services Sdn. Bhd provide a services of carrying cars to Langkawi Island. As a programmer of this company, develop a travel expenses calculator program that reads vehicle type and passenger type travelled as inputs and calculate the total of fares that need to be paid from Kuala Perlis Jetty to Langkawi Jetty. 5% discount is given if total passenger is more than 4 passengers (excluding drivers). Table 1 shows fares of vehicle type and Table 2 shows the fares for passenger type. Repeat the same task using repetition structure until user enter 'n' for no. At the end of the program produce total cost and total distance for the whole journey. Table 1: Fares of Vehicle Туре Vehiele Type Description Fare (RM) 312.00 Car below 1500ce Car below 2000ce MPV below 2000cc Car below 1500cc Car below 2000ce MPV/SUV/4x4/Jeep/Pickup below 2000ce 2 368.00 3 412.00 MPV above 2000 MPV/SUV/4x4/Jeep/Pickup between 2000cc - 3000cc Motoreycle below 125cc Motoreycle above 500cc 4 456.00 3000cc Motoreycle 104.00 6. Motoreycle 170.00 Table 1: Fares of Vehicle Туре Description Passenger Туре Driver Fare (RM) 0.00 Driver 12 years old and above Below 12 years old Below 2 years old (No seat provided) Adult 36.00 3 Children 26.00 4 Infant 6.00 Use if...else statements or switch statements and loop where it is appropriate and create a program with the following output (The numbers in bold/underline are user's input):
Langkawi Ro-Ro Ferry Services Sdn. Bhd provide a services of carrying cars to Langkawi Island. As a programmer of this company, develop a travel expenses calculator program that reads vehicle type and passenger type travelled as inputs and calculate the total of fares that need to be paid from Kuala Perlis Jetty to Langkawi Jetty. 5% discount is given if total passenger is more than 4 passengers (excluding drivers). Table 1 shows fares of vehicle type and Table 2 shows the fares for passenger type. Repeat the same task using repetition structure until user enter 'n' for no. At the end of the program produce total cost and total distance for the whole journey. Table 1: Fares of Vehicle Туре Vehiele Type Description Fare (RM) 312.00 Car below 1500ce Car below 2000ce MPV below 2000cc Car below 1500cc Car below 2000ce MPV/SUV/4x4/Jeep/Pickup below 2000ce 2 368.00 3 412.00 MPV above 2000 MPV/SUV/4x4/Jeep/Pickup between 2000cc - 3000cc Motoreycle below 125cc Motoreycle above 500cc 4 456.00 3000cc Motoreycle 104.00 6. Motoreycle 170.00 Table 1: Fares of Vehicle Туре Description Passenger Туре Driver Fare (RM) 0.00 Driver 12 years old and above Below 12 years old Below 2 years old (No seat provided) Adult 36.00 3 Children 26.00 4 Infant 6.00 Use if...else statements or switch statements and loop where it is appropriate and create a program with the following output (The numbers in bold/underline are user's input):
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
Write a C program
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 4 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY