Submission #1157773

#TimeUsernameProblemLanguageResultExecution timeMemory
1157773aritro_A + B (IOI24_aplusb)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;

int sum(int A, int B){
  return a+b;
}

int32_t main(){
  int a,b;
  cin>>a>>b;
  cout<<sum(a,b)<<endl;
}

Compilation message (stderr)

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