Provide both flowchart and pseudo-code for below C program code please? #include #include #include int main() { float weights[20]; float closestToAvgWeights[20]; float weightInput; float sumOfWeights...


Provide both flowchart and pseudo-code for below C program code please?<br>#include <stdio.h><br>#include <math.h><br>#include <stdlib.h><br>int main()<br>{<br>float weights[20];<br>float closestToAvgWeights[20];<br>float weightInput;<br>float sumOfWeights = 0.0;<br>float avgWeight = 0.0;<br>int count = 0;<br>do{<br>printf(

Extracted text: Provide both flowchart and pseudo-code for below C program code please? #include #include #include int main() { float weights[20]; float closestToAvgWeights[20]; float weightInput; float sumOfWeights = 0.0; float avgWeight = 0.0; int count = 0; do{ printf("Enter a weight in kg, or 0 to quit: "); scanf("%f", &weightInput); if(weightInput<0){ printf("ignoring="" negative="" value.\n");="" continue;="" }="" weights[count]="weightInput;" sumofweights+="weightInput;" avgweight="sumOfWeights/count;" count++;="" }while(weightinput!="0);" printf("number="" of="" entries:="" %d\n",="" count-1);="" printf("average="" weight:="" %0.3f="" kg\n",="" avgweight);="" int="" index="0;" for="" (int="" i="0;" i="">< count;="" i++)="" {="" if(fabs(weights[i]-avgweight)="">< 1.0}{="" closesttoavgweights[index]="weights[i];" index++;="" }="" }="" printf("number="" of="" items="" closest="" to="" average:="" %d\n",index);="" printf("the="" item(s)="" -="" weight="" in="" kg:\n");="" for(int="" i="0;">< index;="" i++){="" printf("%0.3f\n",="" closesttoavgweights[i]);="" }="" return="" 0;="">

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here