Problem sumint
User Yuxuan
Submission Time 2024-04-21 15:05:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:9:6: error: ‘i’ was not declared in this scope
9 | for(i=0;i<d;i++) {
| ^
sumint.cpp:10:6: error: no match for ‘operator<<’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘long long int’)
10 | cin<<x;
| ~~~^~~
| | |
| | long long int
| std::istream {aka std::basic_istream<char>}
sumint.cpp:10:6: note: candidate: ‘operator<<(int, long long int)’ <built-in>
10 | cin<<x;
| ~~~^~~
sumint.cpp:10:6: note: no known conversion for argument 1 from ‘std::istream’ {aka ‘std::basic_istream<char>’} to ‘int’
In file included from /usr/include/c++/9/bits/basic_string.h:48,
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,