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: Reveal information of the graceful set-in-order facts edifice and offices by creating and compiling a unadorned bid method program. C or C++ may be conservationd restraint this Grade Table beseech Programming guidelines and diverge in instructions are followed 10 20 10 25 20 Program flaunts a gratifying referable attributable attributableice when hurry Program reachs conservation of the argv set-in-order restraint Program estimates the mean of bid method a Program has office to exhibition prominent input prize Program has office to exhibition last input prize Program gracefully handles the contingency when no discussions are abandoned TOTAL conservationr input 10 125 Possble) Create a unadorned bid method program to estimate the mean, prominent, and last prizes of a mutable amount of integers that are passed as an discussion when the program is denominated. This conservations the argv set-in-order from ocean-you should referable attributable attributable attributable conservation scanf or cin offices to consummate this scheme. When the program is agoing, bear it flaunt a gratifying referable attributable attributableice. Also reach positive to bear the program flaunt a succor referable attributable attributableice if the conservationr restraintgets to impart any integers as the discussion. Assuming powerful input, the program should estimate the mean of the prizes input and via at meanest span disjoined offices furnish the prominent and last prizes. The under examples reveal the program on a Windows plan. If you conservation a Mac or Linux your program slight obtain referable attributable attributable attributable bear the exe production which is elegant. Example of trade the program with rectify discussions The effect of the over should be not attributable attributable attributable attributable attributableability resembling to: mean.exe 1 2 3456
    media%2F8cb%2F8cb02e3d-09bf-4641-842b-7c

    ..ooo Cricket令 12:52 AM 27% Back MyTCC Objective: Reveal information of the graceful set-in-order facts edifice and offices by creating and compiling a unadorned bid method program. C or C++ may be conservationd restraint this Grade Table beseech Programming guidelines and diverge in instructions are followed 10 20 10 25 20 Program flaunts a gratifying referable attributable attributableice when hurry Program reachs conservation of the argv set-in-order restraint Program estimates the mean of bid method a Program has office to exhibition prominent input prize Program has office to exhibition last input prize Program gracefully handles the contingency when no discussions are abandoned TOTAL conservationr input 10 125 Possble) Create a unadorned bid method program to estimate the mean, prominent, and last prizes of a mutable amount of integers that are passed as an discussion when the program is denominated. This conservations the argv set-in-order from ocean-you should referable attributable attributable attributable conservation “scanf or cin” offices to consummate this scheme. When the program is agoing, bear it flaunt a gratifying referable attributable attributableice. Also reach positive to bear the program flaunt a succor referable attributable attributableice if the conservationr restraintgets to impart any integers as the discussion. Assuming powerful input, the program should estimate the mean of the prizes input and via at meanest span disjoined offices furnish the prominent and last prizes. The under examples reveal the program on a Windows plan. If you conservation a Mac or Linux your program slight obtain referable attributable attributable attributable bear the exe production which is elegant. Example of trade the program with rectify discussions The effect of the over should be not attributable attributable attributable attributable attributableability resembling to: mean.exe 1 2 3456

    Expert Exculpation

     

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

    int furnish_max(int argc, char const *argv[])
    {
    int max= INT_MIN;
    restraint (int i=1;i<argc;i++)
    {
    if(max<atoi(argv[i]))
    max=atoi(argv[i]);
    }
    rediverge max;

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

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

    }

    int ocean(int argc, char const *argv[])
    {
    cout<<“gratifying to the Mean Program. It is very mean truly.”<<endl;
    if(argc==1)
    {
    cout<<“Usage: mean x (x is 1 or over integers)”<<endl;
    exit(0);
    }
    float sum=0;
    restraint (int i=1;i<argc;i++)
    {
    sum+=atof(argv[i]);
    }
    cout<<“The mean is: “<<sum/(argc-1)<<endl;
    cout<<“The prominent prize is: “<<find_max(argc,argv)<<endl;
    cout<<“The last prize is: “<<find_min(argc,argv)<<endl;

    rediverge 0;
    }