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 / 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


Please Help Members By Posting Answers For Below Questions

The statement, int(*x[]) () what does in indicate?

1128


When should the const modifier be used?

1091


What is meant by preprocessor in c?

994


Is it possible to have a function as a parameter in another function?

1062


Is it better to use a macro or a function?

1146


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2868


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.

1391


What is the explanation for the dangling pointer in c?

1101


if p is a string contained in a string?

1831


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

1108


How does sizeof know array size?

1104


What language is c written?

1030


What are integer variable, floating-point variable and character variable?

1234


Using which language Test cases are added in .ptu file of RTRT unit testing???

4262


Explain is it valid to address one element beyond the end of an array?

1190