//Program to print all factors excluding number
#include<stdio.h>
#include<conio.h>
int main()
{
int n,k=1;
clrscr();
printf("enter the number\n");
scanf("%d",&n);
while(k<n)
{
if(n%k==0)
printf("%4d",k);
k++;
}
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.
#include<stdio.h>
#include<conio.h>
int main()
{
int n,k=1;
clrscr();
printf("enter the number\n");
scanf("%d",&n);
while(k<n)
{
if(n%k==0)
printf("%4d",k);
k++;
}
getch();
return 0;
}
To Run this Program Copy it in text editor and save as .c
Then double click on it and then it will get opened in your compiler.
Click on run.