This commit is contained in:
2026-05-05 15:27:55 +02:00
parent 1a8ba1c2bf
commit 6270be5805
13 changed files with 494 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#include <iostream>
class Wektor3d {
int x, y, z;
public:
Wektor3d(int x, int y, int z) : x(x), y(y), z(z) {}
friend int iloczynSkalarny(const Wektor3d &w1, const Wektor3d &w2) {
return w1.x * w2.x + w1.y * w2.y + w1.z * w2.z;
}
};
int main() {
Wektor3d w1(1, 2, 3);
Wektor3d w2(3, 4, 5);
std::cout << iloczynSkalarny(w1, w2);
}