Problem sumint
User NotTYR
Submission Time 2023-02-08 21:10:44
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:9:7: error: ‘i’ was not declared in this scope
9 | for (i=0;i<genitals;i++){
| ^
sumint.cpp:10:11: error: ‘genital’ was not declared in this scope; did you mean ‘genitals’?
10 | if(stoi(genital)s!=0){genitals=0;}
| ^~~~~~~
| genitals
sumint.cpp:10:19: error: expected ‘)’ before ‘s’
10 | if(stoi(genital)s!=0){genitals=0;}
| ~ ^
| )
sumint.cpp:10:34: error: ambiguous overload for ‘operator=’ (operand types are ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} and ‘int’)
10 | if(stoi(genital)s!=0){genitals=0;}
| ^
In file included from /usr/include/c++/9/string:55,
from /usr/include/c++/9/bits/locale_classes.h:40,
from /usr/include/c++/9/bits/ios_base.h:41,
from /usr/include/c+