作者apple09391 (YJY)
看板PLT
标题[讨论]大一资工系求解
时间Thu Nov 17 00:33:22 2016
Write a program that reads n integer numbers and show the larget and smallest
numbers. Input n: 5 Input 5 numbers: 22 56 74 66 32 The largest number is 74.
The smallest number is 22. Hint: Refer to the following code.
#include <stdio.h>
#define SIZE 100
int main(void)
{
int i, a[SIZE] = {0}; printf("Input numbers: ");
scanf("%d", &a[0]);
printf("The largest number is %d.\n", a[0]); printf("The smallest number is %d
.\n", a[0]);
}
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 223.142.23.9
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/PLT/M.1479314005.A.9D9.html
※ 编辑: apple09391 (223.142.23.9), 11/17/2016 00:35:03
1F:推 mars90226: 所以你是想要答案吗? 何不说一下想法? 11/17 02:30
2F:→ apple09391: 这是我目前打的求正解 11/17 09:33
3F:推 suhorng: 错板, 请到其他板发问 11/17 11:03
4F:→ apple09391: 那请问一下该去哪一版求解 11/17 11:09
5F:推 mars90226: C_AND_CPP 11/20 14:29
6F:→ wtchen: C_AND_CPP板禁伸手文 11/20 16:40
7F:推 art1: 程式要求是先输入N个数字,这代表後面会输入几个整数 11/24 18:14
8F:→ art1: 应该说先输入「一个」数字,这个数字代表後面总共要输入几个 11/24 18:15
9F:→ art1: 整数 11/24 18:15
10F:→ art1: 然後要求找出输入的这几个整数中,最大与最小值分别是多少 11/24 18:16
11F:→ art1: 输入几个整数时,似乎是要求用空格分开这几个整数 11/24 18:18
12F:→ james732: 作业自己写好吗 12/02 23:12
13F:→ SOKIYULICA: 看不懂英文可以去google哦~ 01/08 00:55