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 a programme to enter some number and find which
number is maximum and which number is minimum from enterd
numbers.

Answer Posted / deepshree sinha

#include<stdio.h>
#include<conio.h>
void main()
{
int n,i,a[100],max=-999,min=999;
printf("enter how many no. u wanna enter");
scanf("%d ",&n);
printf("enter that values");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
if(a[i]>max)
{
max=a[i];
}
if(a[i]<min)
{
min=a[i];
}
}
printf("max=%d,min=%d",max,min);
getch();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you determine whether to use a stream function or a low-level function?

1099


Why can arithmetic operations not be performed on void pointers?

1004


What is a header file?

1047


What are preprocessor directives in c?

1057


Differentiate between the = symbol and == symbol?

1238


Why isnt any of this standardized in c?

1043


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

1060


Can a pointer be null?

993


What is sizeof array in c?

1003


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

2135


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

1259


What are variables and it what way is it different from constants?

1207


What is %g in c?

1035


What is meant by high-order and low-order bytes?

1019


What are the types of pointers in c?

990