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
What does typedef struct mean?
What does the characters “r” and “w” mean when writing programs that will make use of files?
code for quick sort?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
Which is more efficient, a switch statement or an if else chain?
write a program that declares an array of 30 elements named "income" in the main functions. then cal and pass the array to a programmer-defined function named "getIncome" within the "getIncome" function, ask the user for annual income of 30 employees. then calculate and print total income on the screen using the following function: "void getIncome ( ai []);
Which are low level languages?
Are c and c++ the same?
What are the different types of data structures in c?
Place the #include statement must be written in the program?
What does the format %10.2 mean when included in a printf statement?
How can you access memory located at a certain address?
Function calling procedures? and their differences? Why should one go for Call by Reference?
Why c language is called c?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?