Question: what is causing errors in the following code: #include #include int main ( ) { int sets = 0 ; float po , hc ,

what is causing errors in the following code: #include
#include
int main(){
int sets =0;
float po, hc, sg =0;
int lowestSpec;
int cnter =0;
int counter =0;
int newArray[sets][4];
float flowRate;
printf("Enter the number of limestones to compare:");
scanf("%d", &sets);
int multiples[sets][3];
lowestSpec=0;
for (int i =0; i < sets; i++){
counter++;
cnter++;
printf("Enter the Information, %d :", cnter);
scanf("%d", &multiples[i][0]);
scanf("%d", &multiples[i][1]);
scanf("%d", &multiples[i][2]);
}
for (int i =0; i < sets; i++){
if (multiples[i][2]< lowestSpec){
printf("%d", multiples[i][2]);
lowestSpec = multiples[i][2];
}
};
printf("The lowest specific gravity is,%d", lowestSpec);
for (int i =0; i < sets; i++){
for (int j =0; j <3; j++){
newArray[i][j]= multiples[i][j];
}
}
for (int i =0; i < sets; i++){
flowRate = newArray[i][1]*(-900);
newArray[i][3]= flowRate;
};
printf("%d", newArray[1][3]);
}

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!