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
How can I send mail from within a c program?
What are different types of variables in c?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
Which type of language is c?
What is the right type to use for boolean values in c?
Difference between Function to pointer and pointer to function
What are preprocessor directives in c?
provide an example of the Group by clause, when would you use this clause
What is the difference between malloc() and calloc() function in c language?
What is the collection of communication lines and routers called?
What is typedef struct in c?
What is the meaning of typedef struct in c?
Describe newline escape sequence with a sample program?
How can I write functions that take a variable number of arguments?
Why we use break in c?