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

What is a stream water?

666


Where is c used?

664


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1525


Under what circumstances does a name clash occur?

710


What is this pointer in c plus plus?

610






What does %c do in c?

600


Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.

844


What is the difference between the expression “++a” and “a++”?

660


What is substring in c?

649


What is New modifiers?

684


What is pointers in c with example?

593


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

1506


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

696


What is the significance of an algorithm to C programming?

604


What does *p++ do? What does it point to?

628