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 can I remove the leading spaces from a string?

1139


what do the 'c' and 'v' in argc and argv stand for?

1146


Why clrscr is used in c?

1000


What is the use of sizeof () in c?

1032


What are c preprocessors?

1169


Explain what is the difference between #include and #include 'file' ?

1013


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1073


Is there any possibility to create customized header file with c programming language?

1050


What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1098


Here is a good puzzle: how do you write a program which produces its own source code as output?

1078


What is formal argument?

1120


Is main is a keyword in c?

1111


What is the use of sizeof?

1003


Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

2097


What is the symbol indicated the c-preprocessor?

1223