Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

now it is outputting 0 s how do I fix this int main ( ) { int sets = 0 ; float po , hc

now it is outputting 0s how do I fix this int main(){
int sets =0;
float po, hc, sg =0;
float lowestSpec;
int cnter =0;
int counter =0;
float flowRate;
printf("Enter the number of limestones to compare:");
scanf("%d", &sets);
float multiples[sets][3];
float newArray[sets][4];
lowestSpec=10000;
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){
lowestSpec = multiples[i][2];
}
};
printf("The lowest specific gravity is,%f
", 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;
};
int counterThree=0;
for (int i =0; i < sets; i++){
printf("Flow velocity:
");
counterThree++;
printf("Limestone %d: %f cm^3/s", counterThree, newArray[i][3]);
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions