Question: Write the code in C++.Kindly follow the given details. Question 4:Write a program to add two distances in inch-feet using structure. The function designed for

Write the code in C++.Kindly follow the given details. Write the code in C++.Kindly follow the given details. Question 4:Write a

Question 4:Write a program to add two distances in inch-feet using structure. The function designed for sum should be inside the structure and inch must be added to inch and similar for feet. If inches exceed from 11 and reaches to 12 it will be a feet then there should be increment in feet sum and decrement in inch and leverage inches less than 12. The return type of the function should be struct. The function name should be "add" and the return type must be a struct; the function definition must be inside the structure. (Hint: 1 feet=12 inches) Function Prototype: struct dist add(struct dista, struct dist b)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!