Write a program whose function is to enter 5 numbers from the keyboard and find out the maximum and

Updated on educate 2024-03-16
4 answers
  1. Anonymous users2024-02-06

    void main()

    int i,j,min,a;

    int max=0;

    printf("Enter a number of 5:");

    for(i=0;i<5;i++)

    scanf("%d",&a[i]);

    min=a[0];

    for(i=0;i<5;i++)

    if(a[i]>max)

    max=a[i];

    for(i=0;i<5;i++)

    if(a[i]min=a[i];

    printf("The maximum number is: %d",max);

    printf("The minimum number is: %d",min);

  2. Anonymous users2024-02-05

    Summary. Hello, the answer is average, according to the given program**, the program first reads the 8 integers entered on the keyboard and stores them in the array a. The sum of these 8 integers is then calculated and stored in the variable x.

    Finally, the program iterates through array a, finds integers in the array greater than x divided by 8, and prints it out. Since the program reads the 8 integers entered on the keyboard and calculates their sum, each integer in the output is greater than the average of the 8 integers entered from the keyboard (x 8).

    36.When executing the following procedure, each integer in the output is greater than the 8 integers entered from the keyboard.

    Hello, your topic is partially obscured <>

    You can't reproduce it, that's it.

    Hello, the answer is averageAccording to the given program**, the program will first read the 8 integers entered on the keyboard and store them in the array a. The sum of these 8 integers is then calculated and stored in the variable x. Finally, the program iterates through array a, finds integers in the array greater than x divided by 8, and prints it out.

    Since the program reads the 8 integers entered on the keyboard and calculates their sum, each integer in the output is greater than the average of the 8 integers entered from the keyboard (x 8).

    The OK program calculates the sum of the elements of the deficit array through the local empty state wr9 function, and calls the function in the main function and outputs the result. According to the provided number of source group elements and function calls, the output of the corrected program should be 30 35

  3. Anonymous users2024-02-04

    Summary. What do you want to ask.

    Write a program to enter 5 different integers from the keyboard and save them in an array. Output the maximum value and its.

    What do you want to ask.

    Write a program to enter 5 different integers from the keyboard and save them in an array. Outputs the maximum value and its position.

    #include

  4. Anonymous users2024-02-03

    Follow the process below:

    1 Enter three numbers.

    2 Assign the maximum and minimum variables to the first number.

    3 Compare the maximum minimum with the remaining two numbers, and if it is larger or smaller, replace it with what is called the maximum minimum.

    4 Outputs. ** Below:

    #include

    int main()

Related questions
5 answers2024-03-16

#include

#define m 5 >>>More

5 answers2024-03-16

The ** provided is mainly based on the following two errors: >>>More

3 answers2024-03-16

If you want the source**, I can make one and send it to you. >>>More

6 answers2024-03-16

2. Direct settlement.

3. Members. One of the unbeatable and important advantages of WeChat Mini Program Maker is its membership function. Consumers can apply for membership, so that they can enjoy more high-quality services. >>>More