#include <iostream>
usingnamespace std;
int reverse(int n)
{
int x, y, i, k;
while(x)
{
if(n>0||n<0)
{
x=n%10;n=n/10;
y=i*10+x;
i++;
}
}
return y;
}
int main()
{
int n;
cin>>n;
cout<< reverse();
return 0;
}
Error:
1 2 3 4 5 6
main.cpp:30:20: error: too few arguments to function ‘int reverse(int)’
30 | cout<< reverse();
| ^
main.cpp:12:5: note: declared here
12 | int reverse(int n)
| ^~~~~~~