看板 PLT 關於我們 聯絡資訊
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://www.ptt.cc/bbs/PLT/M.1479314005.A.9D9.html ※ 編輯: apple09391 (223.142.23.9), 11/17/2016 00:35:03
mars90226: 所以你是想要答案嗎? 何不說一下想法? 11/17 02:30
apple09391: 這是我目前打的求正解 11/17 09:33
suhorng: 錯板, 請到其他板發問 11/17 11:03
apple09391: 那請問一下該去哪一版求解 11/17 11:09
mars90226: C_AND_CPP 11/20 14:29
wtchen: C_AND_CPP板禁伸手文 11/20 16:40
art1: 程式要求是先輸入N個數字,這代表後面會輸入幾個整數 11/24 18:14
art1: 應該說先輸入「一個」數字,這個數字代表後面總共要輸入幾個 11/24 18:15
art1: 整數 11/24 18:15
art1: 然後要求找出輸入的這幾個整數中,最大與最小值分別是多少 11/24 18:16
art1: 輸入幾個整數時,似乎是要求用空格分開這幾個整數 11/24 18:18
james732: 作業自己寫好嗎 12/02 23:12
SOKIYULICA: 看不懂英文可以去google哦~ 01/08 00:55