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 java program padovan string program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class Pado

write a static method with one integer parameter, x that returns the value of the polynomial 3x(2)- 7x + 2

write a program that adds all numbers from 1 to 200

#include #include #include #include #include class Employee { private: char *Name; //Set them as pointers... int IdNumber; char *Department; char *Position; public: voi

You're going to simulate a metropolitan subway train.  The train system will start out at Station #1, or Home  Station, and will service multiple stations along its route.


Define the Double Data Type of c Language? The double is used to define BIG floating point numbers and it reserves twice the storage for the number. When the accuracy provided

How do I create two functions: one to put a collection of criteria into normal form, and one to compute the score of a document. A collection of criteria will be represented using

Write a ‘C’ program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.