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
What do you mean by recursion in c?
Is it valid to address one element beyond the end of an array?
What is the right way to use errno?
Can you please compare array with pointer?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
How will you divide two numbers in a MACRO?
When would you use a pointer to a function?
How can I open a file so that other programs can update it at the same time?
What do mean by network ?
What is a macro?
What is the purpose of macro in C language?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is a c token and types of c tokens?
What are the 5 elements of structure?