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
Compare and contrast compilers from interpreters.
What will be your course of action for a push operation?
What are different types of operators?
What is "Duff's Device"?
Why is c not oop?
What is variable and explain rules to declare variable in c?
What is the use of f in c?
Explain how can I make sure that my program is the only one accessing a file?
How do I send escape sequences to control a terminal or other device?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is storage class?
Write a program to generate random numbers in c?
How are structure passing and returning implemented?
I have seen function declarations that look like this
Why c is a procedural language?