PHP Code:
#include "stdio.h"
#include "conio.h"
#include "stdafx.h"
void main()
{
int n,dem,i,k,a;
printf("\n nhap vao n.");
scanf("%d",&n);
for(k=1;k<=n;k++)
if(n%k==0)dem++;
if(dem<3)
printf("\t n=%d .1" ,n);
else if(dem>=3);
{
for(i=1;i<=n;i++)
{
a=n%i;
printf("\t n=%d.%d",a,i);
}
}
getch();
}
Comment