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 do you determine whether to use a stream function or a low-level function?
Why can arithmetic operations not be performed on void pointers?
What is a header file?
What are preprocessor directives in c?
Differentiate between the = symbol and == symbol?
Why isnt any of this standardized in c?
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
Can a pointer be null?
What is sizeof array in c?
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
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What are variables and it what way is it different from constants?
What is %g in c?
What is meant by high-order and low-order bytes?
What are the types of pointers in c?