wap in c to accept n number display the highest and lowest
value
Answer Posted / raghu
void main()
{
int n,a[],j,l,max,min;
printf("enter the no.of numbers to accept");
scanf("%d",&n);
printf("enter the numbers");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
if(a[i]<=min)
{
min=a[i];
}
else if(a[i]>=max)
{
max=a[i];
}
}
printf("highest value is:",max);
printf("lowest value is:",min);
}
| Is This Answer Correct ? | 7 Yes | 5 No |
Post New Answer View All Answers
How to explain the final year project as a fresher please answer with sample project
Explain logical errors? Compare with syntax errors.
what are non standard function in c
Differentiate between null and void pointers.
There seem to be a few missing operators ..
What is %d used for?
What is a 'null pointer assignment' error?
Without Computer networks, Computers will be half the use. Comment.
What is a constant and types of constants in c?
What are the functions to open and close file in c language?
What is the use of typedef in c?
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM
Which is the memory area not included in C program? give the reason
What is data structure in c and its types?
What are the standard predefined macros?