amarblog
Saturday, October 22, 2011
highest number in a array
#include<stdio.h>
#include<conio.h>
int main()
{int a[5],h=a[0],i;
for(i=0;i<5;++i)
scanf("%d",&a[i]);
for(i=0;i<5;++i)
{if(a[i]>a[0])
{a[0]=a[i];
h=a[0];}
}
printf("highestis %d",h);
getch();
return 0;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment