mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-10-28 11:10:38 +01:00
kod
This commit is contained in:
17
uczelnia/2_semestr/programowanie/laby/lab3/zad10.cpp
Normal file
17
uczelnia/2_semestr/programowanie/laby/lab3/zad10.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#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();
|
||||
}
|
||||
Reference in New Issue
Block a user