Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

program to find a smallest number in an array

Answer Posted / sathish

main()
{
int a[20],n,i,s;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
s=a[0];
for(i=0;i<n;i++)
{
if(s>a[i])
{
s=a[i];
}
}
printf("the smallest number is %d",s);
}

Is This Answer Correct ?    138 Yes 57 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to find out prime number using sieve case?

2055


please send me the code for multiplying sparse matrix using c

2137


Write a program for Overriding.

1131


In which header file is the null macro defined?

1320


the question is that what you have been doing all these periods (one year gap)

2043


What is a protocol in c?

964


What is a pointer in c plus plus?

1265


Are the outer parentheses in return statements really optional?

1077


Explain the priority queues?

1051


What is self-referential structure in c programming?

1168


What is structure data type in c?

996


What is volatile c?

976


Is null equal to 0 in sql?

1107


How can I read a binary data file properly?

1119


why do some people write if(0 == x) instead of if(x == 0)?

1033