程式語言與理論-大一資工系求解

匿 匿名 624 次瀏覽 0 個回答

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]);
}

--

我要回答

0 個回答

還沒有人回答,你知道答案嗎?

我要回答

登入會員後即可回答問題。

免費註冊