Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
65627 刘津希 [在线测评解答教程] 求和 C++ Compile Error 0 MS 0 KB 141 2024-01-29 15:49:21

Tests(0/0):


Code:

#include <iostream> useing namespace std; int main(){ int n; cin>>n; while(){ printf("%d\n",n * (n+1) / 2); } }


Run Info:

Main.cc:2:1: error: 'useing' does not name a type
 useing namespace std;
 ^
Main.cc: In function 'int main()':
Main.cc:5:5: error: 'cin' was not declared in this scope
     cin>>n;
     ^
Main.cc:5:5: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:6:11: error: expected primary-expression before ')' token
     while(){
           ^