This commit is contained in:
2026-03-17 16:03:58 +01:00
parent cc1a7821d7
commit ee70d90785
4 changed files with 27 additions and 4 deletions

View File

@@ -0,0 +1 @@
use flake

View File

@@ -6,9 +6,9 @@ private:
int nrAlbumu; // pole prywatne
public:
Student(std::string imie, int nrAlbumu)
: imie(imie), nrAlbumu(nrAlbumu) {} // konstruktor
void pokaz() { // publiczna metoda
Student(std::string imie, int nrAlbumu) // konstruktor
: imie(imie), nrAlbumu(nrAlbumu) {}
void pokaz() { // publiczna metoda
std::cout << imie << " " << nrAlbumu << std::endl;
}
};

View File

@@ -1,3 +1,23 @@
#include <iostream>
int main() {}
class Punkt {
int x, y;
public:
void ustaw(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;
p.ustaw(x, y);
p.pokaz();
}

View File

@@ -0,0 +1,2 @@
Nie wiem o co chodzi, ale wykładowca mówi, że nie jest to takie proste, więc chyba faktycznie nie jest…