#include stdio.h
int number = 0;//這個全域性變數
int maxnumber (int ma[], int n); //ma 是陣列,n是陣列元素個數,
int main (void)
{
int ma[10];
int i = 0;
int num = 0;
for (i=0; i10; i++) {scanf (%d, ma[i]);}
num = maxnumber (ma, 10);
return 0;
}
int maxnumber (int ma[], int n)
for (i=0; in; i++){ if (ma[i] num){num = ma[i]}}
return num;
#include stdio.h
int number = 0;//這個全域性變數
int maxnumber (int ma[], int n); //ma 是陣列,n是陣列元素個數,
int main (void)
{
int ma[10];
int i = 0;
int num = 0;
for (i=0; i10; i++) {scanf (%d, ma[i]);}
num = maxnumber (ma, 10);
return 0;
}
int maxnumber (int ma[], int n)
{
int i = 0;
int num = 0;
for (i=0; in; i++){ if (ma[i] num){num = ma[i]}}
return num;
}