Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- // struktura - składnia:
- struct Student // Student od tego momentu jest nazwą naszego własnego typu zmiennej
- {
- string imie;
- string nazwisko;
- int wiek;
- string e_mail;
- double srednia_ocen;
- };
- int main()
- {
- Student student1; // utworzenie obiektu typu Student o nazwie student1
- student1.imie = "Piotr";
- student1.nazwisko = "Kowalski";
- student1.wiek = 22;
- student1.e_mail = "piotr.kowalski@gmail.com";
- student1.srednia_ocen = 3.8;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement