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
write a program to find out prime number using sieve case?
please send me the code for multiplying sparse matrix using c
Write a program for Overriding.
In which header file is the null macro defined?
the question is that what you have been doing all these periods (one year gap)
What is a protocol in c?
What is a pointer in c plus plus?
Are the outer parentheses in return statements really optional?
Explain the priority queues?
What is self-referential structure in c programming?
What is structure data type in c?
What is volatile c?
Is null equal to 0 in sql?
How can I read a binary data file properly?
why do some people write if(0 == x) instead of if(x == 0)?