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.

Answers were Sorted based on User's Feedback



write a programme to enter some number and find which number is maximum and which number is minimu..

Answer / hari.11

#include<stdio.h>
int main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d", a>b ? a : b);
return 0;
}

for further queries and discussions, visit..

http://forum.campusmaniac.com/
http://www.campusmaniac.com/

Is This Answer Correct ?    2 Yes 0 No

write a programme to enter some number and find which number is maximum and which number is minimu..

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

write a programme to enter some number and find which number is maximum and which number is minimu..

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

More C Interview Questions

What is the difference between variable declaration and variable definition in c?

0 Answers  


Can the curly brackets { } be used to enclose a single line of code?

0 Answers  


In CMM or CMMI certified organizations,we assess only the standard software processes of the organization. We do not assess the organizations other functional departments like HR or Admin. Then how can we certify the entire organization as CMM level company?? We have assessed only software related activities. Right. There is no relation with other departments like Accounts, HR or Admin. Then how can we claim that the whole company is a CMM certified company?

1 Answers   Melstar,


Why static is used in c?

0 Answers  


how i m write c program 1.check prime number 2.prime number series

1 Answers  


write a program in c to print **** * * * * ****

1 Answers   TCS,


How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?

2 Answers   CMC, Wipro,


What would be an example of a structure analogous to structure c?

0 Answers  


Can you tell me how to check whether a linked list is circular?

1 Answers  


What is the memory allocated by the following definition ? int (*x)();

2 Answers   ADITI,


Difference between C and Embedded C?

1 Answers  


What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?

3 Answers  


Categories