Creative Commons License Foxbond's Repo

/** (c) 2015 Michał (Foxbond) Chraniuk */
#include <stdio.h>

int main (){
		struct student {
  	 			char nazwisko[20];
	 				char imie[20];
	 				char nrIndeksu[8];
	 				float ocena;
	 } std;
	 
	 printf("Podaj dane studenta:\nImie: ");
	 scanf("%s", &std.imie);
	 printf("Nazwisko: ");
	 scanf("%s", &std.nazwisko);
	 printf("Nr indeksu: ");
	 scanf("%s", &std.nrIndeksu);
	 printf("Ocena: ");
	 scanf("%f", &std.ocena);
	 
	 printf("\n-----------------\nZapisany student:\nNazwisko: %s\nImie: %s\nNr indeksu: %s\nOcena: %.2f\n", std.nazwisko, std.imie, std.nrIndeksu, std.ocena);
	 
	 
	 getch();
	 return 0;
	 }

> Back