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
How can I remove the leading spaces from a string?
what do the 'c' and 'v' in argc and argv stand for?
Why clrscr is used in c?
What is the use of sizeof () in c?
What are c preprocessors?
Explain what is the difference between #include and #include 'file' ?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
Is there any possibility to create customized header file with c programming language?
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
Here is a good puzzle: how do you write a program which produces its own source code as output?
What is formal argument?
Is main is a keyword in c?
What is the use of sizeof?
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?
What is the symbol indicated the c-preprocessor?