#include<iostream>
using namespace std;
int fun(int a);
int main()
{
int a,result;
cin>>a;
cout<<"函数调用前,a的值="<<a<<endl;
result=fun(a); //实参
cout<<"函数调用后,a的值="<<a<<endl;
return 0;
}
int fun(int a)
{
a=2*a;
return a;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: