问答题

为使下面程序输出结果为:
1 *0=0
3 *4=12
请在横线处填上适当的语句,以使程序完整。
#include <iostream.h>
class A
{ private:
int R1, R2;
public:
A(int r1=5, int r2=0) {______}
void show();
};
void A::show()
{______}
void main( )
{A a(1);
A b(3, 4);
a.show();
b.show();
}

【参考答案】

R1=r1; R2=r2; cout<<R1<<"*"<<R2<<"="<<R1*R2<<endl;