fork download
  1. #include <iostream>
  2. using namespace std;
  3. int sum(int &x, int &y){
  4. int z=x+y;
  5. x=100;
  6. y=200;
  7. return z;
  8. }
  9. int main() {
  10. // your code goes here
  11. int a,b ;
  12. cin>>a>>b;
  13. cout<<sum(a,b)<<endl;
  14. cout<<a<<" "<<b;
  15. return 0;
  16. }
Success #stdin #stdout 0s 5320KB
stdin
10 20
stdout
30
100 200