Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I can not solve the following program.

The following information is stored in some cities chosen by the user:

- the name of the city
- the maximum temperature recorded in the day
- the minimum temperature recorded during the day

Provide output:
- the coldest city
- the hottest city
- the city with the greatest thermal excursion

What I have tried:

Idk how to proceed. I need someone to do it for me.
Posted
Updated 5-Mar-18 9:32am
Comments
[no name] 5-Mar-18 15:18pm    
This forum is not a place to get code written. It is for asking specific questions about issues that arise when you write code.
Member 13710142 5-Mar-18 15:22pm    
Oh sorry. Can you make an exception? I really need it
[no name] 5-Mar-18 15:32pm    
Which part of my comment are you finding difficult to understand.

Make an array of struct[^]s.
Once the array is filled with relevant input values, with a single loop over array items you are going to be able to provide the required output.
 
Share this answer
 
This looks like homework. If you are stuck, you should ask your teacher - no one here will write code for you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900