#include(stdio.h) // place this '<' & '>' instead of '(' & ')' before stdio.h
#include(conio.h)
int main(void)
{
int a[50], max, min, i, n;
clrscr( );
printf("Enter how many integers do u want? :");
scanf(" %d", &n);
for( i=0; i< n ; i++)
{
printf("\nEnter the %d number: ", i );
scanf(" %d", &a[ i ]);
if(i==o) { max=a[i ]; min=a[i ]; }
if(a[ i]>max)
max= a[i ];
if(a[i ]< min)
min= a[i ];
}
printf("\n Maximum : %d", max);
printf("\n Minimum : %d", min);
getch( );
return 0;
}
Tuesday, January 6, 2009
Subscribe to:
Post Comments (Atom)
can u please help to solv the foll. problem
ReplyDelete"write a c program using pointers to perform string compartision"