#include <stdio.h>
int main(void) {
int a=1, b=a%10;
int sum=0;
while( a!=3a , a!=5a , b>=6 )
{
sum = sum + a;
a = a + 1;
}
printf("1から100の合計は%dです。 \n", sum
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgYT0xLCBiPWElMTA7CglpbnQgc3VtPTA7CgoKCXdoaWxlKCBhIT0zYSAsIGEhPTVhICwgYj49NiApCgl7CgkJc3VtID0gc3VtICsgYTsKCQlhID0gYSArIDE7Cgl9CgoJcHJpbnRmKCIx44GL44KJMTAw44Gu5ZCI6KiI44GvJWTjgafjgZnjgIIgXG4iLCBzdW0pOwoJcmV0dXJuIDA7Cn0K
prog.c: In function ‘main’:
prog.c:8:12: error: invalid suffix "a" on integer constant
while( a!=3a , a!=5a , b>=6 )
^~
prog.c:8:20: error: invalid suffix "a" on integer constant
while( a!=3a , a!=5a , b>=6 )
^~
prog.c:8:15: warning: left-hand operand of comma expression has no effect [-Wunused-value]
while( a!=3a , a!=5a , b>=6 )
^
prog.c:8:23: warning: left-hand operand of comma expression has no effect [-Wunused-value]
while( a!=3a , a!=5a , b>=6 )
^