求助,。新人。。
#include <iostream>int add(int first,int second)
{
std::cout<<"in add (),received"<<first<<" and"
<<second<<"\n";
return (first+second);
}
int main()
{
using std::cout;
using std::cin;
cout<<"i'm in main()!\n";
int a,b,c;
cout<<"enter two numbers:3 5 ";
cin>>a;
cin>>b;
cout<<"\ncalling add()\n";
c=add(a,b);
cout<<"\nback in main().\n";
cout<<"c was set to"<<c;
cout<<"excting...\n\n";
return 0;
}
怎样最后输出是下面这个样子、
输出:
i'm in main ()
enter two number : 3 5
calling add()
in add(),receviced 3 and 5
back in main() .
c was set to 8
excting...