Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. struct produse {
  5. float pret;
  6. char* model;
  7. bool disponibil;
  8.  
  9.  
  10. };
  11.  
  12. void afisare(produse materiale[]) {
  13. for(int i=0;i<3;i++)
  14. if (materiale[i].pret > 200 && materiale[i].pret < 400)
  15. {
  16. for (int j = 0; j < strlen(materiale[i].model); j++)
  17. cout << materiale[i].model[j];
  18. }
  19. cout <<endl;
  20. }
  21.  
  22.  
  23. int main() {
  24. produse *muiesteaua;
  25. muiesteaua = new produse[3];
  26. muiesteaua = { {240,"Tricou Versace",true},{390,"Macac aur",true},{123,"Nicolae Guta",false} };
  27. afisare(muiesteaua);
  28. system("Pause");
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement