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

What is the use of sizeof () in c?

1062


‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.

2350


Place the #include statement must be written in the program?

1048


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1913


What is difference between structure and union with example?

1072


List some applications of c programming language?

964


What is volatile variable how do you declare it?

1109


Differentiate Source Codes from Object Codes

1594


What are the types of data types and explain?

1094


What is use of integral promotions in c?

1156


What is strcpy() function?

1174


What is the use of a semicolon (;) at the end of every program statement?

1520


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3985


How does #define work?

1086


Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record

5216