- Get link
- X
- Other Apps
/*This program is to find all factors of a inputed nums'*/
#include <stdio.h>
#include <conio.h>
int main()
{
int num, i;
printf("Enter a number: ");
scanf("%d", &num);
printf("Factors of %d are:", num);
for (i = 1; i <= num; i++)
{
if (!(num%i))
{
printf(" %d ", i);
}
}
getch();
return 0;
}
- Get link
- X
- Other Apps
Comments
Post a Comment