Define array. Write a C program to input any 10 numbers in an array and display it. Find the biggest number among the inputs numbers.
For information about an array
Write a C program to input any 10 numbers in an array and display it. Find the biggest number among the inputs numbers.
#include<stdio.h>
#include<conio.h>
void main()
{
int num[10], i, max;
printf("\n Enter 10 numbers:");
for(i=0;i<10;i++)
{
scanf("%d",&num[i]);
}
for(i=0;i<10;i++)
{
printf("\n %d",num[i]);
}
max=num[0];
for(i=0;i<10;i++)
{
if(num[i]>max)
{
max=num[i];
}
}
printf("\n Biggest number=%d",max);
getch();
}
Output


0 Comments
Please do not enter any spam link on comment box