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
Q: Name the operators which cannot be overloaded? A:sizeof, ., .*, .->, ::, ?:

This is what I need help with. "Create a program creates an interface allowing the user to select from some other programs I have made one being a money converter and the other ca

Access to the channel/devices is achieved by means of general purpose I/O routines Theses are standard functions described in stdio.h header file namely getc and putc. Getc and put

I need to program a microprocessor that would have a temperature, gas, humidity and PIR sensor connected to it. It would send the data to a PC via a Zigbee and receive commands fro

Construct a console program to manage the booking of a Hotel room.

Write a program that reads data into an array of type int. You must use an array. The numbers input are attendance numbers at a conference. Keep a running average, number of events

The probabilistic Hough transform uses random sampling instead of an accumulator array. In this approach the number of random samples r, is not specified in the OpenCV call, but is

write a program that counts the number of occurrences of the string in the n-th padovan string p(n)   program 1 : package test.padovanstring; public class PadovanString {

i am a engineering student and am working on a project in audio processing and so i have designed a FIR filter in Matlab . how can i get my Matlab program converted to C program?

Abstraction is of the process of hiding unwanted details from the user