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
#include
What is function prototype in c with example?
What does p mean in physics?
What are the advantages and disadvantages of pointers?
What does %p mean c?
What is indirection in c?
How can this be legal c?
Who developed c language and when?
What is volatile variable in c with example?
What is the difference between functions abs() and fabs()?
State two uses of pointers in C?
How would you obtain the current time and difference between two times?
What is meant by type specifiers?
hi send me sample aptitude papers of cts?
Can you think of a logic behind the game minesweeper.