C program for diviser, C/C++ Programming


C Program for DIVISER

 

void main()

{

          int result,number,min;

          clrscr();

          printf("ENTER THE NUMBER=");

          flushall();

          scanf("%d",&number);

          min=1;

          while (min<=number)

          {

                   result=number%min;

                   if(result==0)

                   {

                             printf("THE NUMBER IS DIVISIBLE BY=%d\n",min);

                   }

                   min=min+1;

          }

          getch();

}

OUTPUT :

 ENTER THE NO: 10

THE NO IS DIVISIBLE BY : 1

THE NO IS DIVISIBLE BY : 2

THE NO IS DIVISIBLE BY : 5

THE NO IS DIVISIBLE BY : 10

 

Posted Date: 9/10/2012 2:23:15 AM | Location : United States







Related Discussions:- C program for diviser, Assignment Help, Ask Question on C program for diviser, Get Answer, Expert's Help, C program for diviser Discussions

Write discussion on C program for diviser
Your posts are moderated
Related Questions
what is the difference between call by reference and call by pointer method?

What is MIME? MIME - Multi-purpose Internet Mail Extensions. MIME types signifies a standard way of classifying file types over Internet. Browsers and Web servers have

Structures A structure is a user-defined data type, which may have different data types as its members. Creating a structure is a two-part process. First, a structure template

Binary logical bit-wise operators  There are three logical bit-wise operators :                   &             and                 |              or

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve betw

Can a copy constructor admit an object of the similar class as parameter, rather than reference of the object?

Need Cron Job Parsing JSON from API, Inserting in to DB Project Description: The Project is to prepare a Cron Job with an adjustable interval in seconds and milli seconds. Cr

How are postfix and prefix versions of operator++ () differentiated? A: The postfix version of operator++ () contain a dummy parameter of type int. The prefix version does not c

Describe what is actual arguments? - When certain functions are created and used to perform an action on some provided values, some values are required to be passed to them. Th

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst. Shortest remaining time rst algori