#include
#include
#define N 10
int main(void)
{
int i, max;
int arr[N];
srand(time(NULL));
for(i = 0; i < N; i++){
arr[i] = rand() % 100 + 1;
printf("%d ", arr[i]);
}
printf("\n");
max = arr[0];
for(i = 1; i < N; i++)
if(arr[i] > max)
max = arr[i];
printf("The max number is : %d\n", max);
return 0;
}
阅读(220) | 评论(0) | 转发(0) |