#include #include struct student{ int nr; char *name; char *surname; int year; char sex; int braki; }; struct ludzie{ unsigned studenci:3; }; enum studenci{ student1=1, student2, student3, student4, student5, student6, }; void main(){ struct student mak; mak.nr=69696; mak.name="Marian"; mak.surname="Wac"; mak.year=2025; mak.sex='m'; mak.braki=0; printf("Numer albumu: %d,imie: %s ,nazwisko: %s , ukonczenie studiow: %d, plec: %c, zaleglosci jesli brak to 0: %d \n",mak.nr, mak.name, mak.surname, mak.year, mak.sex, mak.braki ); // return 0; struct student w; w.nr=12212; w.name="Maciej"; w.surname="Brudny"; w.year=2022; w.sex='m'; w.braki=1; printf("Numer albumu: %d,imie: %s ,nazwisko: %s , ukonczenie studiow: %d, plec: %c, zaleglosci jesli brak to 0: %d \n",w.nr, w.name, w.surname, w.year, w.sex, w.braki ); struct student d; d.nr=12442; d.name="Tomasz"; d.surname="Czysty"; d.year=2024; d.sex='m'; d.braki=0; printf("Numer albumu: %d,imie: %s ,nazwisko: %s , ukonczenie studiow: %d, plec: %c, zaleglosci jesli brak to 0: %d \n",d.nr, d.name, d.surname, d.year, d.sex, d.braki ); struct student e; e.nr=12332; e.name="Kazimierz"; e.surname="Sowa"; e.year=2028; e.sex='m'; e.braki=1; printf("Numer albumu: %d,imie: %s ,nazwisko: %s , ukonczenie studiow: %d, plec: %c, zaleglosci jesli brak to 0: %d \n",e.nr, e.name, e.surname, e.year, e.sex, e.braki ); struct student r; r.nr=12442; r.name="Mariola"; r.surname="Morta"; r.year=2027; r.sex='k'; r.braki=0; printf("Numer albumu: %d,imie: %s ,nazwisko: %s , ukonczenie studiow: %d, plec: %c, zaleglosci jesli brak to 0: %d \n",r.nr, r.name, r.surname, r.year, r.sex, r.braki ); struct student j; j.nr=12442; j.name="Tomasz"; j.surname="Problem"; j.year=2026; j.sex='m'; j.braki=1; printf("Numer albumu: %d,imie: %s ,nazwisko: %s , ukonczeni studiow: %d, plec: %c, zaleglosci jesli brak to 0: %d \n",j.nr, j.name, j.surname, j.year, j.sex, j.braki ); printf("\n Czy chcesz wczytac swoich studentow 't/n' ?\n"); char znak; scanf("%c", &znak); char znak1; //%s %s %d %c %d" , if( znak == 't' || znak == 'T' ){ printf("\n Czy chcesz wyczyscic baze studentow 't/n' ?\n"); scanf(" %c", &znak1); //Wa¿ny odstêp przed %c bo inaczej nie dzia³a if( znak1 == 't' || znak1 == 'T' ){ system("cls"); printf("Podaj po przecinku dane studenta nr %d\n", student1); struct student student1; printf("podaj nr albumu\n"); scanf("%d", &student1.nr); printf("podaj imie\n"); scanf(" %s", &student1.name); printf("podaj nazwisko\n"); scanf(" %s", &student1.surname); printf("Podaj rok ukonczenia sttudiow\n"); scanf("%d", &student1.year); printf("Podaj plec\n"); scanf(" %c", &student1.sex); printf("podaj braki 1/0\n"); scanf("%d", &student1.braki); // getchar(); // printf("Numer albumu %d, imie: %s, ", student1.nr, ); system("cls"); printf("1. Numer albumu: %d, imie:%s , nazwisko: %s, rok: %d, plec: %c, braki 1/0: %d \n", student1.nr, student1.name, student1.surname, student1.year, student1.sex, student1.braki ); }else{ printf("-------------------Do widzenia--------------------------"); exit( 0 ); } } if ( znak == 'N' || znak == 'n' ){ printf(" Do widzenia"); exit( 0 ); } }