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
What does the error 'Null Pointer Assignment' mean and what causes this error?
Why doesnt that code work?
Is fortran still used in 2018?
What is the function of multilevel pointer in c?
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?
What do you mean by c?
What is a dynamic array in c?
Explain the meaning of keyword 'extern' in a function declaration.
What is malloc and calloc?
Why isnt there a numbered, multi-level break statement to break out
What is the difference between printf and scanf in c?
C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
Why are all header files not declared in every c program?
What is use of bit field?