Search This Blog

Showing posts with label programme to find out max value in array. Show all posts
Showing posts with label programme to find out max value in array. Show all posts

Thursday, February 10, 2011

programme to find out max value in array

#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],max,b;
clrscr();
for(b=0;b<10;b++)
{
printf("a[%d]=",b);
scanf("%d",&a[b]);
}
max=a[b];
for(b=0;b<10;b++)
{
if(a[b]>max)
max=a[b];
}
printf("the max value is=%d",max);
getch();
}