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
application attempts to perform an operation?
Why cant I open a file by its explicit path?
I came across some code that puts a (void) cast before each call to printf. Why?
How do I use strcmp?
to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?
Can you think of a logic behind the game minesweeper.
What happens if header file is included twice?
Explain what are linked list?
Are local variables initialized to zero by default in c?
Differentiate between ordinary variable and pointer in c.
write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.
What does sizeof int return?
What functions are used for dynamic memory allocation in c language?
What are c header files?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a