64,266
社区成员
发帖
与我相关
我的任务
分享
int f(int a,int b,int* c)
{
*c=a*b;
return *c;
}
int f()
{
static int c = 0;
c++;
return c;
}
#include <iostream>
using std::cout;
void f(const int a, const int b, int& c)
{
c = a * b;
return c;
}
int main()
{
static int c = 0;
int a = 2,b = 3;
f(a, b, c);
cout<<c<<endl;
system("pause");
return 0;
}
#include <iostream>
using namespace std;
int f(int a,int b,int &c)
{
c=a*b;
return c;
}
void main()
{
static int c=0;
int a=2,b=3;
int x=f(a,b,c);
cout <<c;
}