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

Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.

2641


c language interview questions & answer

1451


What is the purpose of main( ) in c language?

608


What is the use of getch ()?

617


What is page thrashing?

643






which type of aspect you want from the student.

1695


Which is best book for data structures in c?

588


Explain the use of 'auto' keyword in c programming?

668


What is stack in c?

599


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.

4973


What is break statement?

619


What is the role of && operator in a program code?

560


What is queue in c?

565


How would you rename a function in C?

609


In a switch statement, explain what will happen if a break statement is omitted?

618