write the program for maximum of the following numbers?
122,198,290,71,143,325,98
Answer Posted / mehadi hasan
#include<stdio.h>
int main()
{
int a[50],i,max=0,num,min=200;
printf("enter num :");
scanf("%d",&num);
for(i=1;i<=num;i++)
{
printf("n%d:",i);
scanf("%d",&a[i]);
if(a[i]>max)
max=a[i];
if(min>a[i])
min=a[i];
}
printf("max is %d:\nAnd min is %d:\n",max,min);
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why malloc is faster than calloc?
What is structure in c language?
pierrot's divisor program using c or c++ code
How do I get an accurate error status return from system on ms-dos?
What is the explanation for cyclic nature of data types in c?
What is a null string in c?
Describe wild pointers in c?
How to create struct variables?
How we can insert comments in a c program?
What is a pointer variable in c language?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
Give me the code of in-order recursive and non-recursive.
Write a C program to count the number of email on text
What are actual arguments?
difference between object file and executable file