/*A program to find largest number in an array*/
#include<stdio.h>
int main()
{
int array[10], large, c, location = 1;
printf("Enter 10 integers\n");
for ( c = 0 ; c < 10 ; c++ )
scanf("%d", &array[c]);
large = array[0];
for ( c = 1 ; c < 10 ; c++ )
{
if ( array[c] > large )
{
large = array[c];
location = c+1;
}
}
printf("Largest number is %d at location number %d.\n", large,location);
return 0;
}
This comment has been removed by the author.
ReplyDeletegooooooooooooooooood!!!!!!!!!!!!!!!!!!!!!
ReplyDelete#include
ReplyDeleteint show();
int main(){
return 0;
}
int show(){
printf("i am pakistani ");
return 0;
}