Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- struct produse {
- float pret;
- char* model;
- bool disponibil;
- };
- void afisare(produse materiale[]) {
- for(int i=0;i<3;i++)
- if (materiale[i].pret > 200 && materiale[i].pret < 400)
- {
- for (int j = 0; j < strlen(materiale[i].model); j++)
- cout << materiale[i].model[j];
- }
- cout <<endl;
- }
- int main() {
- produse *muiesteaua;
- muiesteaua = new produse[3];
- muiesteaua = { {240,"Tricou Versace",true},{390,"Macac aur",true},{123,"Nicolae Guta",false} };
- afisare(muiesteaua);
- system("Pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement