mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-10-28 11:10:38 +01:00
zreczc
This commit is contained in:
17
uczelnia/2_semestr/programowanie/laby/lab4/cw3.cpp
Normal file
17
uczelnia/2_semestr/programowanie/laby/lab4/cw3.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
struct Punkt {
|
||||
int x, y;
|
||||
};
|
||||
Punkt p1;
|
||||
Punkt p2{10, 20};
|
||||
Punkt p3 = {30, 40};
|
||||
|
||||
cout << p1.x << ' ' << p1.y; // 0 0
|
||||
cout << endl;
|
||||
cout << p2.x << ' ' << p2.y; // 10 20
|
||||
cout << endl;
|
||||
cout << p3.x << ' ' << p3.y; // 30 40
|
||||
}
|
||||
Reference in New Issue
Block a user