program to find a smallest number in an array
Answer Posted / .::get lost::.
#include<stdio.h>
#include<conio.h>
void 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);
getch();
}
| Is This Answer Correct ? | 24 Yes | 10 No |
Post New Answer View All Answers
Create a simple code fragment that will swap the values of two variables num1 and num2.
I have seen function declarations that look like this
How can you access memory located at a certain address?
Is c programming hard?
the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above
What does c value mean?
Explain logical errors? Compare with syntax errors.
Is there any possibility to create customized header file with c programming language?
How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?
Hi can anyone tell what is a start up code?
What is the difference between malloc() and calloc()?
#include
Explain About fork()?
Explain why c is faster than c++?
explain what is an endless loop?