VILL- DEBANDI, AMTA, HOWRAH PIN-711410 Phone-9836357266
29. Print all factors of a number :—
#include<stdio.h>
int main()
{
int i,n,r;
printf("enter a value of n ");
scanf("%d",&n);
for(i=1;i<=n;i++)
r=n%i;
if(r==0)
printf("%d",i);
}
return 0;
No comments:
Post a Comment