//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();
}
Please Click on ADS!!
Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!
Tuesday, August 31, 2010
Subscribe to:
Post Comments (Atom)

1 comments:
Post a Comment