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
How can I write a function that takes a format string and a variable number of arguments?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
What is identifiers in c with examples?
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
What is sizeof int?
Do you have any idea about the use of "auto" keyword?
What are the functions to open and close file in c language?
What is scope of variable in c?
When should I declare a function?
What are valid operations on pointers?
What do you understand by normalization of pointers?
What is #include cctype?
State the difference between x3 and x[3].
What are the uses of a pointer?
Explain the difference between getch() and getche() in c?