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

What is hashing in c?

634


What is the data segment that is followed by c?

600


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

1877


Explain the difference between strcpy() and memcpy() function?

582


what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

1919






How can I read and write comma-delimited text?

610


How can I make it pause before closing the program output window?

566


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

660


What is clrscr ()?

626


number of times a digit is present in a number

1533


What tq means in chat?

573


What is the most efficient way to count the number of bits which are set in an integer?

578


What is the use of a static variable in c?

582


What is the size of enum in bytes?

576


What is a structure in c language. how to initialise a structure in c?

595