Problem sumint
User tcy
Submission Time 2025-03-12 10:28:23
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp: In function ‘int main()’:
sumint.cpp:7:16: error: expected ‘;’ before ‘<’ token
7 | for (int i=0,i<d,i++) {
| ^
| ;
sumint.cpp:7:16: error: expected primary-expression before ‘<’ token
sumint.cpp:7:22: error: expected ‘;’ before ‘)’ token
7 | for (int i=0,i<d,i++) {
| ^
| ;
sumint.cpp:9:4: error: no match for ‘operator<<’ (operand types are ‘int’ and ‘std::istream’ {aka ‘std::basic_istream<char>’})
9 | n<<cin;
| ~^~~~~
| | |
| | std::istream {aka std::basic_istream<char>}
| int
sumint.cpp:9:4: note: candidate: ‘operator<<(int, int)’ <built-in>
9 | n<<cin;
| ~^~~~~
sumint.cpp:9:4: note: no known conversion for argument 2 from ‘std::istream’ {aka ‘std::basic_istream<char>’} to ‘int’
In file included