Question: C++ Coding/Pointers - #9 B Option Create a program to record temperatures and find the lowest, highest and average temperature. .Create one dimensional float arrays

C++ Coding/Pointers - #9

C++ Coding/Pointers - #9 B Option Create a program to record temperatures

B Option Create a program to record temperatures and find the lowest, highest and average temperature. .Create one dimensional float arrays in the function main) called temps Best possible grade is 90% const int MAXTEMPS=10; float temps [MAXTEMPS]; . Write a loop to ask the user to enter the temperatures until MAXTEMPS is reached. . Calculate and display the average temperature from the array .Find the highest and lowest temperatures in the array and print them out. A Option Do the B option and Best possible grade for the A option is 100% : Use pointers to point at the highest and lowest temperatures in the array. Use pointers instead of the method used in the B option. .Create three pointer variables float float float pCur; pHigh; pLow: // current location in the array // points at highest temp in the array // points at lowest temp in the array Point pCur at the start of the array pCurtemps; .Point pHigh and pLow to the start of the array as well. * Step the pCur through the array using a for loop (Use pcur+ to step it through the array.) .Loop through the array looking for the high and low temperatures. . Ifa lower temperature is found, have pLow point at that element in the array if pCur EXAMPLES>MODULE 4 EXAMPLES POINTERS AND ARRAYS Turn in: Your compressed project folder, source code and screen shots. Turn in either the B or the A option, but not both. A screen print of these runs: Be sure to use Alt-Print screen to only capture your program window and B option Temps 75, 65, 41, 54, 66, 71,78, 81, 55, 39

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!