Problem plantingpotatoes2
User asruby
Submission Time 2024-11-20 10:42:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

plantingpotatoes2.cpp: In function ‘int main()’:
plantingpotatoes2.cpp:57:20: error: ‘n’ was not declared in this scope
57 | int potatoes = (n*(n+1)/2;
| ^
plantingpotatoes2.cpp:57:29: error: expected ‘)’ before ‘;’ token
57 | int potatoes = (n*(n+1)/2;
| ~ ^
| )