Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
89996 徐天哲 [在线测评解答教程] A+B Problem C++ Compile Error 0 MS 0 KB 182 2024-09-07 16:45:03

Tests(0/0):


Code:

# include<iostream> using namespace std; int main(){ int a=0; int b=0; int c=0; scanf("%d %d",&a,&b); c=a+b; printf("sum=%d\n",sum); return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:23: error: 'sum' was not declared in this scope
     printf("sum=%d\n",sum);
                       ^
Main.cc:7:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d",&a,&b);
                         ^