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

for(int i=0;i<8;i++)
for(int j=i+1;j<9;j++)
for(int k=j+1;k<10;k++)
printf("%d\t", i*100+j*10+k);

Is This Answer Correct ?    7 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the translation phases used in c language?

647


What is a method in c?

633


Explain what’s a signal? Explain what do I use signals for?

622


How can you determine the size of an allocated portion of memory?

758


What is the difference between declaring a variable and defining a variable?

735






Difference between goto, long jmp() and setjmp()?

721


When should you not use a type cast?

670


Tell us something about keyword 'auto'.

680


What are valid operations on pointers?

692


Write a program to check prime number in c programming?

620


What is the use of extern in c?

661


What does calloc stand for?

666


What is the function of multilevel pointer in c?

685


What are pointers? What are different types of pointers?

638


Write a program to print fibonacci series without using recursion?

623