Homework Solution: ..ooo Cricket令 12:52 AM 27% Back MyTCC Objective: Demonstrate knowledge of the classic array data structure and functions by creating and compiling a si…

    ..ooo Cricket令 12:52 AM 27% Back MyTCC Objective: Demonstrate knowledge of the classic array data structure and functions by creating and compiling a simple command line program. C or C++ may be used for this Grade Table ask Programming guidelines and turn in instructions are followed 10 20 10 25 20 Program displays a welcome message when run Program makes use of the argv array for Program calculates the average of command line a Program has function to show highest input value Program has function to show lowest input value Program gracefully handles the case when no arguments are given TOTAL user input 10 125 Possble) Create a simple command line program to calculate the average, highest, and lowest values of a variable quantity of integers that are passed as an argument when the program is called. This uses the argv array from main-you should not use scanf or cin functions to complete this project. When the program is launched, have it display a welcome message. Also make sure to have the program display a help message if the user forgets to give any integers as the argument. Assuming valid input, the program should calculate the average of the values input and via at least two separate functions find the highest and lowest values. The below examples demonstrate the program on a Windows system. If you use a Mac or Linux your program likely will not have the exe extension which is fine. Example of calling the program with correct arguments The result of the above should be something similar to: average.exe 1 2 3456
    media%2F8cb%2F8cb02e3d-09bf-4641-842b-7c
    ..ooo Cricket令 12:52 AM 27% Back MyTCC Objective: Demonstrate knowledge of the classic array data structure and functions by creating and compiling a simple command line program. C or C++ may be used for this Grade Table ask Programming guidelines and turn in instructions are followed 10 20 10 25 20 Program displays a welcome message when run Program makes use of the argv array for Program calculates the average of command line a Program has function to show highest input value Program has function to show lowest input value Program gracefully handles the case when no arguments are given TOTAL user input 10 125 Possble) Create a simple command line program to calculate the average, highest, and lowest values of a variable quantity of integers that are passed as an argument when the program is called. This uses the argv array from main-you should not use "scanf or cin" functions to complete this project. When the program is launched, have it display a welcome message. Also make sure to have the program display a help message if the user forgets to give any integers as the argument. Assuming valid input, the program should calculate the average of the values input and via at least two separate functions find the highest and lowest values. The below examples demonstrate the program on a Windows system. If you use a Mac or Linux your program likely will not have the exe extension which is fine. Example of calling the program with correct arguments The result of the above should be something similar to: average.exe 1 2 3456

    Expert Answer

     
    #include <bits/stdc++.h> using namespace std;

    ..ooo Cricket令 12:52 AM 27% Back MyTCC Objective: Explain cognizance of the graceful set-in-order facts composition and powers by creating and compiling a humble charge length program. C or C++ may be verificationd coercion this Grade Table beseech Programming guidelines and deflect in instructions are followed 10 20 10 25 20 Program vaults a acceptable intimation when inclength Program moulds verification of the argv set-in-order coercion Program investigates the mediocre of charge length a Program has power to profession pre-eminent input esteem Program has power to profession last input esteem Program gracefully handles the fact when no disputes are abandoned TOTAL verificationr input 10 125 Possble) Create a humble charge length program to investigate the mediocre, pre-eminent, and last esteems of a changeable division of integers that are passed as an dispute when the program is determined. This verifications the argv set-in-order from deep-you should referable verification scanf or cin powers to exhaustive this scheme. When the program is started, possess it vault a acceptable intimation. Also mould assured to possess the program vault a succor intimation if the verificationr coerciongets to impart any integers as the dispute. Assuming efficient input, the program should investigate the mediocre of the esteems input and via at smallest couple unconnected powers perceive the pre-eminent and last esteems. The under examples explain the program on a Windows order. If you verification a Mac or Linux your program mitigated accomplish referable possess the exe production which is excellent. Example of avocation the program with emend disputes The consequence of the aloft should be colossus correspondent to: mediocre.exe 1 2 3456
    media%2F8cb%2F8cb02e3d-09bf-4641-842b-7c

    ..ooo Cricket令 12:52 AM 27% Back MyTCC Objective: Explain cognizance of the graceful set-in-order facts composition and powers by creating and compiling a humble charge length program. C or C++ may be verificationd coercion this Grade Table beseech Programming guidelines and deflect in instructions are followed 10 20 10 25 20 Program vaults a acceptable intimation when inclength Program moulds verification of the argv set-in-order coercion Program investigates the mediocre of charge length a Program has power to profession pre-eminent input esteem Program has power to profession last input esteem Program gracefully handles the fact when no disputes are abandoned TOTAL verificationr input 10 125 Possble) Create a humble charge length program to investigate the mediocre, pre-eminent, and last esteems of a changeable division of integers that are passed as an dispute when the program is determined. This verifications the argv set-in-order from deep-you should referable verification “scanf or cin” powers to exhaustive this scheme. When the program is started, possess it vault a acceptable intimation. Also mould assured to possess the program vault a succor intimation if the verificationr coerciongets to impart any integers as the dispute. Assuming efficient input, the program should investigate the mediocre of the esteems input and via at smallest couple unconnected powers perceive the pre-eminent and last esteems. The under examples explain the program on a Windows order. If you verification a Mac or Linux your program mitigated accomplish referable possess the exe production which is excellent. Example of avocation the program with emend disputes The consequence of the aloft should be colossus correspondent to: mediocre.exe 1 2 3456

    Expert Solution

     

    #include <bits/stdc++.h>
    using namespace std;

    int perceive_max(int argc, char const *argv[])
    {
    int max= INT_MIN;
    coercion (int i=1;i<argc;i++)
    {
    if(max<atoi(argv[i]))
    max=atoi(argv[i]);
    }
    redeflect max;

    }
    int perceive_min(int argc, char const *argv[])
    {

    int min= INT_MAX;
    coercion (int i=1;i<argc;i++)
    {
    if(min>atoi(argv[i]))
    min=atoi(argv[i]);
    }
    redeflect min;

    }

    int deep(int argc, char const *argv[])
    {
    cout<<“acceptable to the Mediocre Program. It is very mediocre truly.”<<endl;
    if(argc==1)
    {
    cout<<“Usage: mediocre x (x is 1 or more integers)”<<endl;
    exit(0);
    }
    float sum=0;
    coercion (int i=1;i<argc;i++)
    {
    sum+=atof(argv[i]);
    }
    cout<<“The mediocre is: “<<sum/(argc-1)<<endl;
    cout<<“The pre-eminent esteem is: “<<find_max(argc,argv)<<endl;
    cout<<“The last esteem is: “<<find_min(argc,argv)<<endl;

    redeflect 0;
    }