This commit is contained in:
2026-03-17 16:46:05 +01:00
parent ee70d90785
commit 020939d1e3
8 changed files with 126 additions and 15 deletions

View File

@@ -1,3 +1,32 @@
#include <iostream>
int main() {}
class Punkt {
int x, y;
public:
Punkt() {
x = 0;
y = 0;
}
Punkt(int x, int y) {
this->x = x;
this->y = y;
}
void pokaz() { std::cout << '(' << x << ',' << y << ')' << std::endl; }
};
int main() {
int x, y;
std::cout << "Podaj x i y: ";
std::cin >> x;
std::cin >> y;
Punkt p;
std::cout << "Domyślny punkt: ";
p.pokaz();
std::cout << std::endl;
std::cout << "Punkt z twoimi danymi: ";
Punkt p2(x, y);
p2.pokaz();
}