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
What is the use of sizeof () in c?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
Place the #include statement must be written in the program?
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
What is difference between structure and union with example?
List some applications of c programming language?
What is volatile variable how do you declare it?
Differentiate Source Codes from Object Codes
What are the types of data types and explain?
What is use of integral promotions in c?
What is strcpy() function?
What is the use of a semicolon (;) at the end of every program statement?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
How does #define work?
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