 Hello friends. I am Sanjay Gupta. In this video, I am going to demonstrate you how you can calculate some of heights of 10% using area of structure in C programming. Before starting, you can note how you can search my YouTube channel. You can type my name Sanjay Gupta in YouTube search. My channel will be available there. You can watch various programming related videos there. Now I am going to implement solution of this problem. So first I am including a header file. Then I am declaring a structure whose name is height. It will be having two members feet and inch. Then I have terminated structure declaration. Now I am going to define main function. Inside main, I have to declare an area of structure this way. So this notation will be known as area of structure. Name of area is h and it will be storing 10 feet and 10 inches separately. To store addition of these 10 heights, I am declaring one more structure variable that is s and for loop processing, I am declaring int i. Now to initialize s.feet and s.inch with 0, I am writing this statement s.feet equals to s.inch equals to 0. Now to read 10 heights from user, I am implementing this loop. So this loop will print the message enter percent d height and i plus 1. So this way the message enter first height will be displayed because i plus 1 will print 1. Then enter second height, third height. So this way 10 messages will be displayed. After printing messages each time through scanf, I can read the entered height from user. So for that purpose h.i sorry h of i.feet and then m percent h of i.inch. So this way feet and inch will be stored in h area of structure. So this loop will be reading all heights from user. Now I have to perform addition operation. So again I am going to implement a for loop. Now inside this for loop, I have to write f.feet equals to s.feet plus h of i.feet. So this way all feet which are stored in h area will be added into s structure variable. Then s.inch equals to s.inch plus h of i.inch. So after processing of this loop, all feet and inches of h area will be stored inside s.feet and s.inch. Now I have to apply a loop which will check s.inch whether it is greater than equals to 0 or not. So if inches are greater than equals to 0 sorry whether inches are greater than equals to 12 or not. So if inches are greater than equals to 12 then I can convert those inches into feet. So for that purpose I am applying s.feet plus plus and s.inch equals to s.inch minus 12. So till inches are greater than equals to 12 then feet will be incremented by 1 and inches will be decremented by 12 or subtracted by 12. So after completion of this Y loop I can print final outcome on output screen. So feet equals to percent d then s.feet and print f.inch equals to percent d and s.inch. So this way I have implemented the complete solution in front of you where heights of 10% are added using area of structure. Now I am going to execute this code. So you can see it is asking for height. So I am entering 4 feet, 2 inch, 5 feet, 2 inch, 5 feet, 2 inch then 4th height, 5, 2 again 5, 2 again 5, 2. So this way I have entered total 10 heights. So you can see I have entered 2 all times for inches. So inches will be total 20. Now you have to see feet sum is 50 and inches 8. So addition of inches will be 20 but 20 is greater than 12. So 12 are subtracted from inches. So remaining inches are 8 and 1 is added into feet. So that's why this output is available in front of you. So this way the program is working properly. I hope you have understood the concept behind this example. So this way I have calculated some of heights of 10% using area of structure in C programming. If you want to watch more programming related videos you can search my name Sanjay Gupta. My channel will be available on first phase. You can watch various programming related videos there. Thank you for watching this video.