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
#include
What is 1f in c?
How can I make it pause before closing the program output window?
What is the difference between array_name and &array_name?
Can you think of a logic behind the game minesweeper.
What is c programming structure?
How do you override a defined macro?
What is the concatenation operator?
What functions are used for dynamic memory allocation in c language?
What is the modulus operator?
What are the different categories of functions in c?
What is difference between constant pointer and constant variable?
What is the difference between class and object in c?
What is calloc in c?
What is null in c?