c++改错应该怎么改

main()
{ int x,y;
printf("%d\n",sum(x+y));
int sum(a,b);
{ int a,b;
return(a+b);
}
}
(要求:
1、调试过程中,给出翻译信息栏处的错误提示;
2、把代码修改成正确的代码,不能额外增加变量;

有用请采纳哈


#include <bits/stdc++.h>
using namespace std;

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

int main() 
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int x,y;
    printf("%d\n",sum(x,y));
    return 0;
}