#include "stdlib.h" #include "stdio.h" struct prod { char NazwaProd; int Ilosc; float Cena; float Wartosc; } ; void ObliczWartosc(prod &buty) { buty.Wartosc = buty.Cena * buty.Ilosc; } int main() { prod buty = {'ABC', 123, 24.5, 0}; ObliczWartosc(buty); printf("Wartosc: %.2f\n", buty.Wartosc); system("pause"); }