我需要以下C程序的帮助 [英] I need help with the following C program

查看:64
本文介绍了我需要以下C程序的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法解决以下程序。



以下信息存储在用户选择的一些城市:



- 城市名称

- 当天记录的最高温度

- 白天记录的最低温度



提供输出:

- 最冷的城市

- 最热门的城市

- 带有的城市最大的热量游览



我尝试过的事情:



Idk怎么样继续。我需要有人为我做这件事。

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.

推荐答案

制作一个 struct [ ^ ] s。

一旦数组填充了相关的输入值,在数组项上有一个循环就可以提供所需的输出。
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.


这看起来像家庭作业。如果你遇到困难,你应该问你的老师 - 这里没有人会为你编写代码。
This looks like homework. If you are stuck, you should ask your teacher - no one here will write code for you.


这篇关于我需要以下C程序的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆