program to find a smallest number in an array
Answer Posted / farhana parvin sunny
#include<stdio.h>
#include<conio.h>
int main(void)
{
int n,i,l,a[10];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
l=a[0];
for(i=0;i<n;i++)
{
if(l>a[i])
{
l=a[i];
}
}
printf("the lowest number is %d",l);
getch();
return 0;
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Is c programming hard?
How do you list files in a directory?
How do I use void main?
What are reserved words with a programming language?
What is the difference between new and malloc functions?
What is typedef struct in c?
What is s in c?
What is pivot in c?
What does it mean when a pointer is used in an if statement?
Is it possible to pass an entire structure to functions?
What does s c mean in text?
please give me some tips for the placement in the TCS.
Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?
Explain what are preprocessor directives?
What are header files? What are their uses?