Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is const and volatile in c?

992


Explain the use of keyword 'register' with respect to variables.

973


What is dynamic memory allocation?

1287


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

1073


What is the c value paradox and how is it explained?

994


What is the difference between declaring a variable by constant keyword and #define ing that variable?

3290


Write a code to determine the total number of stops an elevator would take to serve N number of people.

1191


Was 2000 a leap year?

1005


What is linear search?

1091


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

2581


Why use int main instead of void main?

1073


Can we declare a function inside a function in c?

991


What does c mean in standard form?

1108


about c language

1963


Hai what is the different types of versions and their differences

1901