Problem givingtree
User YellowKing
Submission Time 2026-06-23 11:15:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

givingtree.cpp: In function ‘void s(int, int)’:
givingtree.cpp:5:10: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
5 | return 0
| ^
givingtree.cpp:5:11: error: expected ‘;’ before ‘}’ token
5 | return 0
| ^
| ;
6 | }
| ~
givingtree.cpp:8:10: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
8 | return x
| ^
givingtree.cpp:8:11: error: expected ‘;’ before ‘}’ token
8 | return x
| ^
| ;
9 | }
| ~
givingtree.cpp: In function ‘int main()’:
givingtree.cpp:36:44: error: too few arguments to function ‘void s(int, int)’
36 | cout<<string(asp,' ')<<"T"<<string(s(a-2),' ')<<"T"<<'\n';
| ^
givingtree.cpp:3:6: note: decl