Problem snack
User ZRDI
Submission Time 2024-03-01 14:59:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

snack.cpp: In function ‘int main()’:
snack.cpp:11:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
11 | if(s[i] != "M"){
| ^~~
snack.cpp:12:24: error: expected ‘;’ before ‘}’ token
12 | a[i] = s[i]
| ^
| ;
13 | } else {
| ~
snack.cpp:19:5: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
19 | ans = a[0];
| ^~~
| abs