Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. struct zestaw {
  2. string nazwa_zestawu;
  3. string typ_procesora;
  4. int czestotliwosc_zegara;
  5. float cena_zestawu;
  6. };
  7.  
  8. void przepisz(zestaw tab1[],zestaw tab2[],int rozmiar){
  9. for(int i=0;i<rozmiar;i++){
  10. tab2[i].nazwa_zestawu==tab1[i].nazwa_zestawu;
  11. tab2[i].typ_procesora==tab1[i].typ_procesora;
  12. tab2[i].czestotliwosc_zegara==tab1[i].czestotliwosc_zegara;
  13. tab2[i].cena_zestawu==tab1[i].cena_zestawu;
  14. }
  15. }
  16.  
  17. int main(){
  18. zestaw tab1[2],tab2[2];
  19. tab1[0].nazwa_zestawu="zestaw 1";
  20. tab1[0].typ_procesora="AMD Ryzen";
  21. tab1[0].czestotliwosc_zegara=4;
  22. tab1[0].cena_zestawu=2100;
  23. tab1[1].nazwa_zestawu="zestaw 2";
  24. tab1[1].typ_procesora="Intel";
  25. tab1[1].czestotliwosc_zegara=5;
  26. tab1[1].cena_zestawu=21646.546;
  27. przepisz(tab1,tab2,2);
  28. cout << "Tablica zostala przepisana" << endl;
  29. }
  30. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement