Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. main()
  4. {
  5. struct student
  6. {
  7. string imie;
  8. string nazwisko;
  9. int rok;
  10. int wiek;
  11. double stypN;
  12. double stypS;
  13. };
  14.  
  15. student a[5];
  16.  
  17. a[0]={"Kacper","Piechut",2000,19,3000,2000};
  18. a[1]={"Jakub","Maminski",2000,20,5000,1000};
  19. a[2]={"Marcel","Kowalski",2000,18,2000,1000};
  20. a[3]={"Jan","Biernacki",2000,25,5000,1500};
  21. a[4]={"Andrzej","Gora",2000,20,3000,2000};
  22.  
  23. for(int i=0;i<5;i++)
  24. {
  25. cout<<a[i].imie<<" ";
  26. cout<<a[i].nazwisko<<" ";
  27. cout<<a[i].rok<<" ";
  28. cout<<a[i].wiek<<" ";
  29. cout<<a[i].stypN<<" ";
  30. cout<<a[i].stypS<<endl;
  31. }
  32. for(int i)
  33. if(a[i].nazwisko[a[i].nazwisko.size()-1]=='i')
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement