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
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
c language interview questions & answer
What is the purpose of main( ) in c language?
What is the use of getch ()?
What is page thrashing?
which type of aspect you want from the student.
Which is best book for data structures in c?
Explain the use of 'auto' keyword in c programming?
What is stack 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 is break statement?
What is the role of && operator in a program code?
What is queue in c?
How would you rename a function in C?
In a switch statement, explain what will happen if a break statement is omitted?