mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-10-27 19:20:39 +01:00
.
This commit is contained in:
1
uczelnia/2_semestr/programowanie/laby/.envrc
Normal file
1
uczelnia/2_semestr/programowanie/laby/.envrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
use flake
|
||||||
@@ -6,9 +6,9 @@ private:
|
|||||||
int nrAlbumu; // pole prywatne
|
int nrAlbumu; // pole prywatne
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Student(std::string imie, int nrAlbumu)
|
Student(std::string imie, int nrAlbumu) // konstruktor
|
||||||
: imie(imie), nrAlbumu(nrAlbumu) {} // konstruktor
|
: imie(imie), nrAlbumu(nrAlbumu) {}
|
||||||
void pokaz() { // publiczna metoda
|
void pokaz() { // publiczna metoda
|
||||||
std::cout << imie << " " << nrAlbumu << std::endl;
|
std::cout << imie << " " << nrAlbumu << std::endl;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
#include <iostream>
|
#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();
|
||||||
|
}
|
||||||
|
|||||||
@@ -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…
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user