Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Temperature Sorting Program C++ Write a program that will: 1.Call a function to input temperatures for consecutive days in an array. The temperatures are to

Temperature Sorting Program C++

Write a program that will: 1.Call a function to input temperatures for consecutive days in an array. The temperatures are to be integer numbers. 2.The user will input the number of temperatures. There will be no more than 10 temperatures. 3.Call a function to sort the array by ascending order. You can use any sorting algorithm you wish as long as you can explain it. 4.Call a function that will return the average of the temperatures. The average should be displayed to two decimal places.

Below is my source code, am I on the right track? What algorithm should i use for this question? For the number 4, I could just use the average function right? Also is there any youtube channels or other learning sources that you would recommend for a beginner to study C++? I have tried reading the books but I did not feel that really helps me. I am a beginner and I have tried searching it online but I did not find any solution.

#include  using namespace std; int main() { int numtemp; cout<<"Please input the number of temperatures to be read"<>numtemp; int temp[numtemp]; for (int i=0;i>temp[i]; } return 0; } 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

305 mg of C6H12O6 in 55.2 mL of solution whats the molarity

Answered: 1 week ago