Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72432 韩墨濡 [在线测评解答教程] 求和 C++ Compile Error 0 MS 0 KB 148 2024-05-05 21:01:13

Tests(0/0):


Code:

#include<iostream> using namespace std; intmain(){ int a,b,c cin>>a; b=a+1; c=a/2; a=b*c; cout<<a; return 0; }


Run Info:

Main.cc:3:9: error: ISO C++ forbids declaration of 'intmain' with no type [-fpermissive]
 intmain(){
         ^
Main.cc: In function 'int intmain()':
Main.cc:5:5: error: expected initializer before 'cin'
     cin>>a;
     ^
Main.cc:7:5: error: 'c' was not declared in this scope
     c=a/2;
     ^