Problem givingtree
User YellowKing
Submission Time 2026-06-23 11:15:21
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:8:10: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
8 | return x;
| ^
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: declared here
3 | void s(int a,int x){
| ^
givingtree.cpp:43:44: error: too few arguments to function ‘void s(int, int)’
43 | cout<<string(bsp,' ')<<"T"<<string(s(b-2),' ')<<"T"<<'\n';
| ^
givingtree.cpp:3:6: note: dec