Question
Task 1: Input of data types and arithmetic expressions C Program for ABC Car Hire Application You are required to develop C program, which will
Task 1: Input of data types and arithmetic expressions
C Program for ABC Car Hire Application
You are required to develop C program, which will allow staff at the ABC Car Hire to compute the cost of a customer for a car hire activity. Initially, for simplicity, we assume that there is a flat daily rate $34.50 per day.
This program will prompt for and read in initial of a person's first name (e.g., M for Mark and S for Sophie) using scanf and prompt to read the customer's license number. The customer name and license number will be stored in different variables. The program will then output the name in a prompt to input the number of days that a customer wants to hire a car. The days of hire should be declared as an integer i.e., int.
After all inputs (don't forget to hit the Enter button on the keyboard), the program will execute and display the summary of hire including the rental.
The arithmetic expression to calculate the hire cost is very simple:
rental = days hired * daily rate
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