Submission #1215287

#TimeUsernameProblemLanguageResultExecution timeMemory
1215287clovixA + B (IOI24_aplusb)C++20
Compilation error
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);
}

Compilation message (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;
      |            ^