尚未解答 電腦與網際網路 / 其他:電腦
程式語言與理論-大一資工系求解
匿
匿名
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]);
}
--