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 / sm1
#include<stdio.h>
int main(){
int i,j,k;
for (i=1; i<8; i++)
for (j=i+1; j<9; j++)
for (k=j+1; k< 10; k++)
printf("%d\n", i*100+j*10+k);
}
| Is This Answer Correct ? | 19 Yes | 12 No |
Post New Answer View All Answers
What are types of structure?
Write a program to swap two numbers without using the third variable?
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
What is array of structure in c?
In C language, a variable name cannot contain?
What does the error 'Null Pointer Assignment' mean and what causes this error?
Difference between MAC vs. IP Addressing
Explain threaded binary trees?
Can a void pointer point to a function?
What is the argument of a function in c?
What is data structure in c language?
Explain how to reverse singly link list.
What is the difference between c and python?
Explain the use of function toupper() with and example code?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?