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
What is const and volatile in c?
Explain the use of keyword 'register' with respect to variables.
What is dynamic memory allocation?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
What is the c value paradox and how is it explained?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
Was 2000 a leap year?
What is linear search?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Why use int main instead of void main?
Can we declare a function inside a function in c?
What does c mean in standard form?
about c language
Hai what is the different types of versions and their differences