prog.cpp: In function ‘int main()’:
prog.cpp:5:6: error: ‘i’ was not declared in this scope
for (i=1; i<7, i++)
^
prog.cpp:5:19: error: expected ‘;’ before ‘)’ token
for (i=1; i<7, i++)
^
prog.cpp:9:1: error: expected ‘;’ before ‘d’
d=a-b
^
prog.cpp:13:13: error: invalid operands of types ‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ and ‘int’ to binary ‘operator%’
if (abs(a-b)%3==1 && d<x) x=d;
~~~~~~~~^~
prog.cpp:14:13: error: invalid operands of types ‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ and ‘int’ to binary ‘operator%’
if (abs(a-b)%3==2 && d<y) y=d;}
~~~~~~~~^~
prog.cpp:15:13: error: ‘print’ was not declared in this scope
if (S%3!=0) print S("%d", S);
^~~~~
prog.cpp:17:20: error: lvalue required as left operand of assignment
{if (x=100000 && y=100000)
^~~~~~
prog.cpp:18:12: error: ‘prints’ was not declared in this scope
prints ("0");
^
prog.cpp:20:1: error: expected ‘;’ before ‘else’
else S=S-y
^~~~