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...

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


Please Help Members By Posting Answers For Below Questions

How to explain the final year project as a fresher please answer with sample project

962


Explain logical errors? Compare with syntax errors.

1058


what are non standard function in c

1899


Differentiate between null and void pointers.

1152


There seem to be a few missing operators ..

1035


What is %d used for?

1024


What is a 'null pointer assignment' error?

1199


Without Computer networks, Computers will be half the use. Comment.

2288


What is a constant and types of constants in c?

1105


What are the functions to open and close file in c language?

1187


What is the use of typedef in c?

1021


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

2110


Which is the memory area not included in C program? give the reason

1934


What is data structure in c and its types?

1057


What are the standard predefined macros?

1125