write a code fragment which makes use of the variables: float cubic[100][4]; int
ID: 3615710 • Letter: W
Question
write a code fragment which makes use of the variables:float cubic[100][4];
int n;
Each row of the array contains information about a rectangularsolid (a bod) which is going to be shipped via FedEx. Specifically,the width, height, and depth of each box in inches.The variable ncontains the number off rows in the array which have validinformation. your code fragment is to calculate the size in cubicfeet for each box and put it in the last column of the array in thecorresponding row.
For example if n is 3 and the array contains:
12.0 12.0 12.0 0.0
48.0 36.0 6.0 19.0
6.0 6.0 6.0 6.0
5.0 5.0 5.0 5.0
other values
After execution of the code fragment, the array should contain
12.0 12.0 12.0 1.0
48.0 36.0 6.0 6.0
6.0 6.0 6.0 .0125
5.0 5.0 5.0 5.0
other values
Explanation / Answer
please rate - thanks #include #include main() {float cubic[100][4]; int n,m,i,j; printf("how many rows do you have data for? "); scanf("%d",&m); printf("How many rows are valid? "); scanf("%d",&n); for(i=0;iRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.