Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Varza
- {
- private:
- int R1, R2, R3, R4;
- public:
- Varza() : R1(0), R2(0), R3(0), R4(0) { }
- void Ivedimas();
- int operator + () { return R1 + R2 + R3 + R4; }
- };
- void Varza::Ivedimas()
- {
- cout << "Ivesktie R1: "; cin >> R1;
- cout << "Ivesktie R2: "; cin >> R2;
- cout << "Ivesktie R3: "; cin >> R3;
- cout << "Ivesktie R4: "; cin >> R4;
- }
- int main()
- {
- Varza varzos;
- varzos.Ivedimas();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement