{ int i,j,k; for(i=4;i>0;i--) { j=5; k=i+j; if((k%4=1)||(k%4=2)||(k%4=3)||(k%4=4))

问题描述:

{ int i,j,k; for(i=4;i>0;i--) { j=5; k=i+j; if((k%4=1)||(k%4=2)||(k%4=3)||(k%4=4))
#include
void main()
{
\x09int i,j,k;
\x09for(i=4;i>0;i--)
\x09{
\x09\x09j=5;
\x09\x09k=i+j;
\x09if((k%4=1)||(k%4=2)||(k%4=3)||(k%4=4))
\x09\x09printf("\n");
\x09printf("%3d",k);
\x09}
}
执行
E:\hhs.c(9) :error C2106:'=' :left operand must be l-value
E:\hhs.c(9) :error C2106:'=' :left operand must be l-value
E:\hhs.c(9) :error C2106:'=' :left operand must be l-value
E:\hhs.c(9) :error C2106:'=' :left operand must be l-value
执行 cl.exe 时出错.
hhs.obj - 1 error(s),0 warning(s)
这个怎么改,求细解.

if语句中表达式是==而不是=