c++中用指针求两个数的乘积的代码

c++中用指针求两个数的乘积的代码
2025-03-24 23:53:23
推荐回答(2个)
回答1:

#include 
#include  //可选

using namespace std;

int main()
{
int a,b;
int *c, *d;

cin>> a >> b ;

c = &a;
d = &b;

cout << (*c) * (*d) <
getch() //可选

return 0;

}

回答2:

#include
using namespace std;
int main()
{
cout<<"Enter two numbers:"<int a,b;
cin>> a >> b ;
cout <<"The product of"<return 0;
}