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 is the use of pointers in C?
Can you think of a logic behind the game minesweeper.
Why header file is used in c?
write a program to concatenation the string using switch case?
Why doesnt that code work?
Tell me about low level programming languages.
What are the disadvantages of a shell structure?
What is the difference between Printf(..) and sprint(...) ?
#include
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
Define Array of pointers.
Can you mix old-style and new-style function syntax?
Is main is user defined function?
When should the const modifier be used?
The statement, int(*x[]) () what does in indicate?