#include <stdio.h>
int main()
{
int arr[10] = { 0, 12, 3, 45, 6, 4, 2, 56, 8, 47 };
int max = 0;
int i = 0;
printf("数组为:\n");
for (i = 0; i < 10; i++)
{
printf("%d\t",arr[i]);
}
for (i = 0; i < 10; i++)
{
if (arr[i]>max)
{
max = arr[i];
}
}
printf("数组中最大数是%d\n", max);
system("pause");
}
int main()
{
int arr[10] = { 0, 12, 3, 45, 6, 4, 2, 56, 8, 47 };
int max = 0;
int i = 0;
printf("数组为:\n");
for (i = 0; i < 10; i++)
{
printf("%d\t",arr[i]);
}
for (i = 0; i < 10; i++)
{
if (arr[i]>max)
{
max = arr[i];
}
}
printf("数组中最大数是%d\n", max);
system("pause");
}