Factors of a Number [C/C++]

//Coded by : dL1nkx
//Copyright: dL1nkx.blogspot.com
#include <stdio.h>
int main()
{
int x,y,z;
printf("enter the number: ");
scanf("%d",&x);
printf("The factors are as follow:\n");
for (y=1;y<=x;y++)
      { if (x%y==0)
        printf("%d\n",y);}// loop end
return 0;
}