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
State the difference between realloc and free.
What is the difference between array and structure in c?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
What is actual argument?
What is conio h in c?
What are the benefits of c language?
Define VARIABLE?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
Can a pointer be null?
What is a good data structure to use for storing lines of text?
Why & is used in c?
write a programming in c to find the sum of all elements in an array through function.
What is c language & why it is used?
What is the return type of sizeof?
program to convert a integer to string in c language'