Question: PLEASE HELP ME make this as simple as possible. PLEASE i am new to coding and am confused This is the code i have so

PLEASE HELP ME make this as simple as possible. PLEASE i am new to coding and am confused

PLEASE HELP ME make this as simple as possible. PLEASE i amThis is the code i have so far

#include

int main()

{

float count=0;

float num;

float sum = 0;

float product;

float min;

float max;

printf ("Enter number of positive integers to analyze: ");

scanf("%f",&count);

printf("Enter positive intergers: " );

scanf("%f", &num);

for (count>0 ;count

if (count==0){

min=num;

max=num;

}

if(num > max) {

max = num;

}

if(num

min = num;

}

sum += num;

product *= num;

count += 1;

}

printf("Sum of all numbers is %f ", sum);

printf("Average of all numbers is %f ", sum/count);

printf("Product of all numbers is %f ", product);

printf("Largest number is %f ", max);

printf("Smallest number is %f ", min);

return 0;

}

1. C Program let user to keep on inputting positive integers until a negative number is entered. Prints the sum, the average, the product, the largest and the smallest of all the integers that are input from the keyboard

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!