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
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 between two points can b

programing code on board coloring in clanguage

what is spanning tree? explain prims algorithm spanning tree?

Describe problem with Runtime type identification? A: The run time kind identification comes at cost of performance penalty. Compiler maintains class.

Rule: To determine the canonical form we should OR the min terms. A min term is defined as a Boolean equation of the input if the output is logic '1'. If the input is logic '1'

Function Templates Function templates give you with the capability to write a one function that is a skeleton, or template, for a family of similar functions. In function ov


A: Using the extern "C" linkage specification around the C function declarations. Programmers must know about mangled function names and type-safe linkages. After that they must

Generate a class node that contains an integer id, a position (x, y)  and a vector of 0 5,  generate a set of  x nodes each with random connectivity n.    Implement an algorith