| Task: | A + B |
| Sender: | david.meichel |
| Submission time: | 2018-09-14 13:21:55 +0300 |
| Language: | C++ |
| Status: | COMPILE ERROR |
Compiler report
input/code.cpp: In function 'int main()':
input/code.cpp:7:5: error: expected ',' or ';' before 'cout'
cout << result ;
^~~~
input/code.cpp:6:10: warning: unused variable 'result' [-Wunused-variable]
long result = (n*(n+1)*(n+2)/6)
^~~~~~Code
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
long result = (n*(n+1)*(n+2)/6)
cout << result ;
}
