Question: use C++ 1. Write a function to print your name, as shown below. The function would be called from the main function. ***** ******** **
use C++
1. Write a function to print your name, as shown below. The function would be called from the main function. ***** ******** ** * * * Your Name Here * **************** ******** 2. Write a function (by using pass by value concept) named swap with 2 parameters of type float and display the swapped value. In function main display the original value and call function swap. 3. A litre is 0.264179 gallons. Write a program with the main function that will read in the number of litres of petrol consumed by the user's car and the number of kilometres travelled by the car and will then output the number of kilometres per gallon the car delivered. Define a function to compute the number of kilometres per gallon. Your program should use a globally defined constant for the number of litres per gallon
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
