#include<stdio.h>
main()
{
int x,n,r;
scanf("%d" , & x);
for (n=2;n<(x/2);n++)
{
(x%n=r); //error is here
(r=0) ? (print("%d\n is a factor")):(print("%d\n is not a factor"));
}
}
No sure why im getting the "lvalue required as left operand of assignment" error. Any help would be much appreciated.