제출 #1215287

#제출 시각아이디문제언어결과실행 시간메모리
1215287clovixA + B (IOI24_aplusb)C++20
컴파일 에러
0 ms0 KiB
#include <iostream> using namespace std; int sum(int A, int B) { return a+b; } int main() { int a, b; cin >> a >> b; cout << sum(a, b); }

컴파일 시 표준 에러 (stderr) 메시지

aplusb.cpp: In function 'int sum(int, int)':
aplusb.cpp:6:10: error: 'a' was not declared in this scope
    6 |   return a+b;
      |          ^
aplusb.cpp:6:12: error: 'b' was not declared in this scope
    6 |   return a+b;
      |            ^