36乘括号里1⼀4 5⼀62⼀9作业帮

2024-12-29 23:07:56
推荐回答(2个)
回答1:

#include

using namespace std;

class BaseClass
{
public:
BaseClass() {}
~BaseClass() {}
public:
virtual void print() = 0;
};

class Test : public BaseClass
{
private:
int m_nTest;
public:
Test(int n = 0):m_nTest(n) {}
~Test() {}
public:
virtual void print() {cout< friend istream& operator>>(istream&,Test&);
friend ostream& operator<<(ostream&,Test&);
};

istream& operator>>(istream& input,Test& test)
{
input>>test.m_nTest>>endl;
return input;
}

ostream& operator<<(ostream& output,Test& test)
{
output< return output;
}

int main()
{
Test test;

cin>>test;
cout< test.print();
return 0;
}

回答2:

简便计算
36×(1/4+5/6+2/9)
=36×1/4+36×5/6+36×2/9
=9+30+8
=47