The steps for finding total car rent for a specified distance with a specified car type using register variables are as follows:
- The user is asked to enter the distance of the planned journey.
- The user is asked to specify the type of the car, that is, whether the car should have AC or not.
- Two register variables are defined to indicate the rent per kilometer for the AC and non-AC car, respectively.
- One more register variable is defined that is set to represent the service tax percentage.
- On the basis of the type of the car chosen by the user, the distance value is multiplied by the respective register variable to find out the total amount.
- The service tax is computed and added to the total amount. The service tax percentage ...