#include int main () int TOTNUM, NUMBER, SUM, INDEX, PRODUCT, SMALLNUM, BIGNUM; float AVERAGE; SUM - 0; INDEX = e; PRODUCT = 1; SMALLNUM = 99999999; BIGNUM = -99999999; printf("How many number do you want to enter "); scanf ("%d", &TOTNUM); while (INDEX < TOTNUM) INDEX = INDEX + 1; printf("Please enter a number "); scanf ("%d", &NUMBER); SUM = SUM + NUMBER; PRODUCT = PRODUCT * NUMBER; if (SMALLNUM > NUMBER) SMALLNUM = NUMBER; if (BIGNUM < NUMBER) BIGNUM = NUMBER; AVERAGE = float(SUM) / float(TOTNUM); printf("Sum of numbers = %d", SUM); printf("\nAverage of numbers = Xf", AVERAGE); printf("\nProduct of numbers = %d", PRODUCT); printf("\nSmallest number = %d", SMALLNUM); printf("\nBigest number = %d", BIGNUM); return e;

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section: Chapter Questions
Problem 8PP: (Data processing) A bank’s customer records are to be stored in a file and read into a set of arrays...
icon
Related questions
Question

Rewrite the program with a little bit of changes in the codes

#include <stdio.h>
int main ()
{
int TOTNUM, NUMBER, SUM, INDEX, PRODUCT, SMALLNUM, BIGNUM;
float AVERAGE;
SUM = 0;
INDEX - e;
PRODUCT = 1;
SMALLNUM = 99999999;
BIGNUM = -99999999;
printf("How many number do you want to enter ");
scanf("%d", &TOTNUM);
while (INDEX < TOTNUM)
INDEX = INDEX + 13;
printf("Please enter a number ");
scanf ("%d", &NUMBER);
SUM = SUM + NUMBER;
PRODUCT = PRODUCT
if (SMALLNUM > NUMBER) SMALLNUM = NUMBER;
if (BIGNUM < NUMBER) BIGNUM = NUMBER;
NUMBER;
AVERAGE = float (SUM) / float(TOTNUM);
printf("Sum of numbers = %d", SUM);
printf("\nAverage of numbers = %f", AVERAGE);
printf("\nProduct of numbers = %d", PRODUCT);
printf("\nSmallest number = %d", SMALLNUM);
printf("\nBigest number = %d", BIGNUM);
return e;
Transcribed Image Text:#include <stdio.h> int main () { int TOTNUM, NUMBER, SUM, INDEX, PRODUCT, SMALLNUM, BIGNUM; float AVERAGE; SUM = 0; INDEX - e; PRODUCT = 1; SMALLNUM = 99999999; BIGNUM = -99999999; printf("How many number do you want to enter "); scanf("%d", &TOTNUM); while (INDEX < TOTNUM) INDEX = INDEX + 13; printf("Please enter a number "); scanf ("%d", &NUMBER); SUM = SUM + NUMBER; PRODUCT = PRODUCT if (SMALLNUM > NUMBER) SMALLNUM = NUMBER; if (BIGNUM < NUMBER) BIGNUM = NUMBER; NUMBER; AVERAGE = float (SUM) / float(TOTNUM); printf("Sum of numbers = %d", SUM); printf("\nAverage of numbers = %f", AVERAGE); printf("\nProduct of numbers = %d", PRODUCT); printf("\nSmallest number = %d", SMALLNUM); printf("\nBigest number = %d", BIGNUM); return e;
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Declaring and Defining the Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT