

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


9.1 Declare a structure variable rectangle. Define its two-member variable length and breadth of type float. Create two variables of this structure in main () function. Take date form user for both these variable. Define a function addrectangle (). Pass these two structure variable to this function and add the length and breadth of both rectangles. Display the resultant rectangle sides.
9.2 Calculate the sum of natural number using recursion. [Hint: if user enter 5, the function will add all the number from 1 to 5 i.e.; 5+4+3+2+1=15]