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


Please Help Members By Posting Answers For Below Questions

Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

646


Which are low level languages?

634


What are the preprocessor categories?

639


Can main () be called recursively?

627


What are reserved words with a programming language?

602






4. main() { int c=- -2; printf("c=%d",c); }

1366


how to execute a program using if else condition and the output should enter number and the number is odd only...

1654


How would you rename a function in C?

618


using for loop sum 2 number of any 4 digit number in c language

1734


What should malloc(0) do?

613


What is #define?

575


How is a macro different from a function?

654


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

613


Explain bit masking in c?

635


What is a pointer on a pointer in c programming language?

621