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 / goloap

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

Is This Answer Correct ?    6 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the error 'Null Pointer Assignment' mean and what causes this error?

732


Why doesnt that code work?

597


Is fortran still used in 2018?

582


What is the function of multilevel pointer in c?

665


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?

1561






What do you mean by c?

578


What is a dynamic array in c?

585


Explain the meaning of keyword 'extern' in a function declaration.

707


What is malloc and calloc?

563


Why isnt there a numbered, multi-level break statement to break out

581


What is the difference between printf and scanf in c?

739


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

601


Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.

590


Why are all header files not declared in every c program?

592


What is use of bit field?

762