C++ Programs & Stuffz

Nothing like anything!!!

Please Click on ADS!!

Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!

Tuesday, August 31, 2010

Generate divisors of a given integer

//pgm to generate divisors of a given integer
#include<iostream.h>
#include<conio.h>
void main()
{
    int i,n;
    clrscr();
    cout<<"enter the value of the integer";
    cin>>n;
    for(i=1;i<=n;i++)
    {
        if(n%i==0)
            cout<<i<<endl;
    }
    getch();
}

1 comments:

this blog has been possted 10 yrs ago r u still online??
 

Post a Comment

free counters