write a programme to enter some number and find which
number is maximum and which number is minimum from enterd
numbers.
Answer Posted / nitin garg
#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{
int num[5],i,small=0,large=0;
printf("enter 5 no
");
for(i=0;i<5;i++)
{ scanf("%d",&num[i]);
}
small=num[0];
for(i=0;i<5;i++)
{
if(num[i]>large)
large=num[i];
if(num[i]<small)
small=num[i];
}
printf("
Larger no is: %d",large);
printf("
Smaller no is: %d",small);
getch();
return 0;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
The statement, int(*x[]) () what does in indicate?
When should the const modifier be used?
What is meant by preprocessor in c?
Is it possible to have a function as a parameter in another function?
Is it better to use a macro or a function?
‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
What is the explanation for the dangling pointer in c?
if p is a string contained in a string?
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
How does sizeof know array size?
What language is c written?
What are integer variable, floating-point variable and character variable?
Using which language Test cases are added in .ptu file of RTRT unit testing???
Explain is it valid to address one element beyond the end of an array?