program to find a smallest number in an array
Answer Posted / asif ali afsar
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],b,c,n;
clrscr();
printf("How many size you want to Cheah\n");
scanf("%d",&n);
printf("Enter the numbers\n");
for(b=0; b<n; b++)
{
scanf("%d",&a[b]);
}
for(b=0; b<n; b++)
{
if(c<a[b])
{
c=c;
}
else
{
c=a[b];
}
}
printf("smalest no is %d",c);
getch();
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are qualifiers and modifiers c?
How can I read a binary data file properly?
What is the c value paradox and how is it explained?
What are identifiers and keywords in c?
What does *p++ do? What does it point to?
What are file streams?
What is #include stdio h and #include conio h?
how to execute a program using if else condition and the output should enter number and the number is odd only...
What are the different file extensions involved when programming in C?
What is the difference between struct and typedef struct in c?
What are the uses of a pointer?
what do u mean by Direct access files? then can u explain about Direct Access Files?
What is a null string in c?
What are the ways to a null pointer can use in c programming language?
What is wrong in this statement? scanf(ā%dā,whatnumber);