一个曾经问过的问题
输出“1+1=?”然后输入答案,正确的就输出YES,错误的就输出NO。
要求:一定要用函数递归做!
看谁能写出最好的函数,和最多的函数。
1+1.c C:\Win-TC\projects\1+1.c(7) : error C2065: 'cout' : undeclared identifier C:\Win-TC\projects\1+1.c(7) : error C2297: '<<' : illegal, right operand has type 'char [6]' C:\Win-TC\projects\1+1.c(8) : error C2065: 'cin' : undeclared identifier C:\Win-TC\projects\1+1.c(8) : warning C4552: '>>' : operator has no effect; expected operator with side-effect C:\Win-TC\projects\1+1.c(15) : error C2297: '<<' : illegal, right operand has type 'char [4]' C:\Win-TC\projects\1+1.c(15) : error C2065: 'endl' : undeclared identifier C:\Win-TC\projects\1+1.c(18) : error C2297: '<<' : illegal, right operand has type 'char [3]' C:\Win-TC\projects\1+1.c(19) : error C2297: '<<' : illegal, right operand has type 'char [6]' C:\Win-TC\projects\1+1.c(20) : warning C4552: '>>' : operator has no effect; expected operator with side-effect Error executing cl.exe.
1+1.exe - 7 error(s), 2 warning(s) 提示了这些错误,最好用TC写,这个看不懂啊!比如“<<"是什么东东?