26 lines
346 B
C++
26 lines
346 B
C++
#include <iostream>
|
|
using namespace std;
|
|
class A {
|
|
public:
|
|
A(int x = 0) : r1(x){};
|
|
void print() {
|
|
cout << 'E' << r1 << '-';
|
|
}
|
|
void print(int x) {
|
|
cout << 'P' << r1 * r1 * r1 + x << '-';
|
|
}
|
|
|
|
private:
|
|
int r1;
|
|
};
|
|
|
|
int main() {
|
|
A a1(3), a2(9);
|
|
a1.print(1);
|
|
a2.print();
|
|
return 0;
|
|
}
|
|
|
|
/*
|
|
P28-E9-
|
|
*/ |