Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- struct Cenovnik
- {
- char Ime[20];
- int Cena;
- } proizvod;
- void pokazi(Cenovnik proizvod);
- int main()
- {
- for (int n=0; n<10; n++)
- {
- cout<<"Vnesete ime na proizvod: ";
- cin.getline (proizvod.Ime[n],20);
- cout<<"Vnesete cena na proizvodot: ";
- cin.getline (proizvod[n].Cena);
- }
- for (n=0; n<10; n++)
- pokazi (proizvod[n]);
- system("pause");
- return 0;
- }
- void pokazi(Cenovnik proizvod)
- {
- cout<<proizov.Ime;
- cout<<"("<<proizovd.Cena<<")"<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement