Create a program to determine the largest number out of 15 numbers entered (numbers entered one at a time). This should be done in a function using this prototype:
double larger (double x, double y);
Make sure you use a for loop expression inside your function.
Enter 15 numbers
11 67 99 2 2 6 8 9 25 67 7 55 27 1 1
The largest number is 99
Hints:
* Read the first number of the data set. Because this is the only number read to this point, you may assume that it is the largest number so far and call it max.
* Read the second number and call it num. Now compare max and num, and store the larger number into max. Now max contains the larger of the first two numbers.
* Read the third number. Compare it with max and store the larger number into max.
* At this point, max contains the largest of the first three numbers. Read the next number, compare it with max, and store the larger into max.
Repeat this process for each remaining number in the data set using a for expression.
Write a program using a function and a switch statement. The user should be prompted to enter a number in main. The function is called and the number entered is passed to the function. This function parameter will then be used in a switch to discover and print out the number word within the function (for example, 1=one, 2=two, 3=three, etc.).
Enter a number: 1
You entered the number one.
You may choose to limit the number entered by the user to a particular range. Be sure to prompt the user with this range, so you can deal with correct and incorrect numbers entered.
Solution Summary
The programs are properly commented to make it easier for you to understand.
... Conduct a test of independence to determine whether a ... Small 72.00 28.00 Medium 86.67 13.33 Large 88.00 12.00. ... and opinions 20 10 General editorial 15 11 Family ...
... 25 20 2001 5 6 25 36 30 7 Total 15 20 55 ... b. Determine the estimated sales if 40 contacts are made ... 2. For a sample of 32 large US cities, the correlation between ...
... standard deviation is $1,050 ,סּhow large a sample ... population relevant when one is determining the sample ... What is necessary to determine the sample size ...
... You do that by determining how likely or unlikely it ... the end of this test to determine the appropriate ... The observed statistic is larger than the critical value ...
... What is the probability that a loaf is larger than 21 ... S2 S3 D1 10 8 6 D2 14 15 2 D3 7 ... a. Determine the probability distribution, and the cumulative probability ...
... 3. Determine whether the hypothesis test is a one-tailed or ... Hence larger the range, greater is the standard deviation ... 35, 41 iii) The data values are: 15, 23, 23 ...
...Determine the p- value ... Sum Rural Area 7 233 Small Urban Area 6 167 Large Urban Area ... of Variation SS df Between Groups 116.315873 2 Within Groups 171.4619048 15. ...
... 7. A major department store has determined that its customers charge an average of $500 ... h. Determine the inter quartile range. ... Why do you think it is so large? ...
...Determine the mean of salary level of city council members in large... b) Management said the sample size determined above is too large... 12 Determining the p value. ...
... 1 2 188.325 6 2091.1 0 15 4 1 ... the square footage into two categories, large square footage ...Determine if there is a statistically significant difference between ...