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

application attempts to perform an operation?

1491


Why cant I open a file by its explicit path?

593


I came across some code that puts a (void) cast before each call to printf. Why?

678


How do I use strcmp?

639


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

1573






Can you think of a logic behind the game minesweeper.

2007


What happens if header file is included twice?

653


Explain what are linked list?

623


Are local variables initialized to zero by default in c?

549


Differentiate between ordinary variable and pointer in c.

615


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

4987


What does sizeof int return?

591


What functions are used for dynamic memory allocation in c language?

600


What are c header files?

579


write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a

1451