mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-09-07 12:10:40 +02:00
18 lines
270 B
C++
18 lines
270 B
C++
#include <iostream>
|
|
|
|
class Punkt {
|
|
int x, y;
|
|
|
|
public:
|
|
Punkt(int x, int y) : x(x), y(y) {}
|
|
Punkt() : Punkt(0, 0) {}
|
|
void pokaz() { std::cout << '(' << x << ',' << y << ')' << std::endl; }
|
|
};
|
|
|
|
int main() {
|
|
Punkt p;
|
|
p.pokaz();
|
|
Punkt p2(2, 2);
|
|
p2.pokaz();
|
|
}
|