C Program to find Number of Three Digits Numbers Greater Than 100

Q. Write a C Program to find the number of three digit numbers greater than 100 in which digits appear in strictly increasing order.
e.g. 123, 124, 125, 134, 135, 136, 145, 146, 147,….,689,789. (IIT-JAM-2011)

Source Code:

#include <stdio.h>
#include <conio.h>

int main(void)
{
int i,j,k,temp=0;
clrscr();
for(i=1;i<=9;i++)
{
         for(j=1;j<=9;j++)
         {
                for(k=1;k<=9;k++)
                {
                      if(i<j && j<k)
                      {
                      temp++;
                      printf("\n\n\t Count %d : %d%d%d",temp,i,j,k);
                      }
                }
         }
}
getch();
return 0;
}

Output:

C Program to find the number of three digit numbers greater than 100 in which digits appear in strictly increasing order.

Fig.: C Program to find the number of three digit numbers greater than 100 in which digits appear in strictly increasing order.

Version/Compatibility: Turbo C++ Version 3.0 (Borland International, Inc.)

Download Now (.Zip File – 36KB)…

2 Comments

  1. jatin says:

    this was best site to me ever see..too good sir,,,

0 Trackbacks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge
To use solvemedia you must get an API key from http://api.solvemedia.com/public/signup