Question

Design a program that asks the user to enter a series of 20 numbers. The program...

Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in the array and then display the following data:

  • The lowest number in the array
  • The highest number in the array
  • The total of the number in the array

The average of the numbers in the array

PLEASE GIVE THE PSEUDOCODE AND CODE IN C PROGRAMMING

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note: Could you plz go through this code and let me know if u need any changes in this.Thank You
=================================

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>

int main() {
const int SIZE=20;
int i;
int arr[SIZE];
int min,max,sum=0;
double avg=0.0;
for(i=0;i<SIZE;i++)
{
    printf("Enter Number#%d:",(i+1));
    scanf("%d",&arr[i]);
   }
     
   min=arr[0];
   max=arr[0];
     
   for(i=0;i<SIZE;i++)
   {
   if(min>arr[i])  
   {
       min=arr[i];
       }
       if(max<arr[i])  
   {
       max=arr[i];
       }
       sum+=arr[i];
      
   }
   avg=((double)sum)/SIZE;
   printf("\nMinimum :%d\n",min);
   printf("Maximum :%d\n",max);
   printf("Sum :%d\n",sum);
   printf("Average :%.2f\n",avg);
     
   return 0;
  
}

===================================

Output:

=====================Could you plz rate me well.Thank You

Add a comment
Answer #2

Let me know if you need more help. also a like would be highly appreciated.

Add a comment
Know the answer?
Add Answer to:
Design a program that asks the user to enter a series of 20 numbers. The program...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Design a program that lets the user enter the total rainfall for each of 12 months...

    Design a program that lets the user enter the total rainfall for each of 12 months into an array. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amount. PLEASE MODULARIZED THE CODE   PLEASE USE C PROGRAMMING AND ADD PSEUDOCODE

  • Design a program in pseudocode that asks the user to enter a string containing a series...

    Design a program in pseudocode that asks the user to enter a string containing a series of ten single-digit numbers with nothing separating them. The program should display the sum of all the single digit numbers in the string except for the highest value digit. You may only use one main module and one sorting function; otherwise, do not modularize your program. For example, if the user enters 5612286470, the sum would be 33. (0+1+2+2+4+5+6+6+7) If there are multiple highest...

  • Total Sales Design a program that asks the user to enter a store’s sales for each...

    Total Sales Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result. Need: variable lists, IPO Chart, pseudocode, Flowchart, and working Python code. 2. Lottery Number Generator Design a program that generates a 7-digit lottery number. The program should have an Integer array with 7 elements. Write a loop...

  • Design a program using Flowgorithm or any flowcharting software that asks the user to enter a...

    Design a program using Flowgorithm or any flowcharting software that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result. PSEUDOCODE AND FLOWCHART IS REQUIRED FOR THIS CLASSWORK.

  • Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized...

    Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized with the following strings: “Einstein”, “Newton”, “Copernicus”, and “Kepler”. 2. Assume names in an Integer array with 20 elements. Write a pseudocode algorithm a For Loop that displays each element of the array. 3. Assume the arrays numberArray1 and numberArray2 each have 100 elements. Write a pseudocode algorithm that copies the values in numberArray1 to numberArray2 . 4. Write a pseudocode algorithm for a...

  • Description: Write a program that asks the user to enter a series of numbers, and report...

    Description: Write a program that asks the user to enter a series of numbers, and report the following: • The maximum number in the series • The minimum number in the series • The average of all positive numbers in the series The user will enter a pound key ‘#’ to stop the series. in Python

  • write a program code that asks the user how many numbers they wish to find the...

    write a program code that asks the user how many numbers they wish to find the statistics of and then asks the user to enter those numbers. The program must then calculate and display the average variance and standard deviation of the numbers entered by the user. the program code must -ask three user how many numbers they wish to find the statistics of -ask the user to enter those numbers and store them in an array - use a...

  • Design a program that asks the user to enter a store's sales for each day of...

    Design a program that asks the user to enter a store's sales for each day of the week. The amounts should be stored in an array. Use a loop to calculate the total sales for the week and display the result. Be sure to attach your PYTHON code. No modularization required.

  • Design the logic for a program that allows a user to enter 10 numbers, then displays...

    Design the logic for a program that allows a user to enter 10 numbers, then displays all of the numbers, the sum and average of the numbers. (Use array and loop.) the pseudocode in python please

  • Write a program that asks the user to enter a string and then asks the user...

    Write a program that asks the user to enter a string and then asks the user to enter a character. The program should count and display the number of times that the specified character appears in the string. python programming

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT