
Mass Center


Define a structure named mass_point that will be used to manage material points of a solid body. The members of the structure are the mass of the point material and its three coordinates in the space, as shown in the figure (the material points P1, P2, ..., Pi with masses respectively m1, m2, ..., mi) are shown. All values are double type. The program should include functions for:
iv. the input of N (N = known) material data into a table of mass_point structures (data_entry function). Use random numbers with limits of 100.0 for the mass and 30.0 for each of the coordinates.
v. (1 row for each material point) (data_display function).
vi. finding the inertia moments (in a function named find_inertia) taking into account all elements of the table of structures.
The three functions will be called consecutively from main (). After calling the find_inertia function, the program should display the values for Ixoy, Iyoz, Izox.