Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:55:24+00:00 2026-06-06T18:55:24+00:00

program to output all 4 digit numbers where no prior digit is greater than

  • 0

program to output all 4 digit numbers where no prior digit is greater than latter.

Numbers should be 1-9(including 1 & 9).

Numbers can be like 1234,2345. First digit should be less than second, second should be less than third, third should be less than fourth.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:55:25+00:00Added an answer on June 6, 2026 at 6:55 pm
    <?php
    $count = 1;
    for($i=1;$i<=6;$i++){
      for($j=$i+1;$i<$j,$j<=7;$j++){
       for($k=$j+1;$j<$k,$k<=8;$k++){
        for($l=$k+1;$k<$l,$l<=9;$l++){
                echo $i.$j.$k.$l."<br>";
                $count++;
        }
       }
      }
    }
    echo $count;
    ?>
    

    There are total 127 such numbers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's a simple program I wrote to find all the non-decreasing-digit numbers of length
how can i make a device input and output control program on windows 7??
Can anyone explain the output of this program and how I can fix it?
Why is the output of the following program just int3 and not int3&4 ?
I need to write all my program output to a text file. I believe
Here is a simple program to output to a text file: #include <iostream> #include
Right now I am writing a simulation program which output is formatted according to
I am trying to learn python and am making a program that will output
The output of my font program is skewed. I'm pretty sure that the problem
I am writing a program that processes the output of another program. Assume my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.