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

the number 138 is called well ordered number because the
three digits in the number (1,3,8) increase from left to right
(1<3<8). the number 365 is not well ordered coz 6 is larger
than 5.
write a program that wull find and display all possible
three digit well ordered numbers.

sample:
123,124,125,126,127,128,129,134
,135,136,137,138,139,145,146,147
148
149,156.......789

Answer Posted / karthick_int

#include<stdio.h>
void main()
{
int n,i,j,k,m;
clrscr();
printf("Entr d no:");
scanf("%d",&n);
i=n%10;j=n/10;
k=j%10;m=j/10;
printf("The values are:%d\t%d\t%d\t",i,k,m);
if((i>k)&&(i>m))
{
if(k>m)
{
printf("Well ordered");
}
}
else
{
printf("not");
}
getch();
}

Is This Answer Correct ?    7 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a code to remove duplicates in a string.

986


Do pointers need to be initialized?

1021


What are the storage classes in C?

1075


What is null in c?

1009


Tell me when is a void pointer used?

1105


When should the volatile modifier be used?

1111


Explain how does free() know explain how much memory to release?

1016


please explain every phase in the "SDLC" in the dotnet.

2564


When should a far pointer be used?

1063


what is stack , heap ,code segment,and data segment

2638


Explain how can I convert a string to a number?

1029


What is the use of bit field?

1120


When should a type cast not be used?

1008


What is the use of extern in c?

1051


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

1072