lucacodorean

Untitled

Feb 12th, 2020
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5.  
  6. struct masina
  7. {
  8.     string marca;
  9.     string culoare;
  10.     int vitezamax;
  11.     struct specificatii
  12.     {
  13.         int cai_putere;
  14.         string tractiune;
  15.         int numarusi;
  16.         int serie_sasiu;
  17.     } specs ;
  18.     string data_fabricatie;
  19. } a;
  20.  
  21. int main()
  22. {
  23.     a.marca="Ford EcoSport";
  24.     a.culoare="alb";
  25.     a.vitezamax=173;
  26.     a.specs.cai_putere = 13;
  27.     a.specs.tractiune= "AWD";
  28.     a.specs.numarusi= 5;
  29.     a.specs.serie_sasiu= 5384347823;
  30.     a.data_fabricatie = "12/2016";
  31.  
  32.     cout<<"INFORMATII GENERALE"<<endl;
  33.     cout<<a.marca<<" "<<a.culoare<<" "<<a.data_fabricatie<<endl;
  34.     cout<<a.vitezamax<<" "<<"km/h"<<endl;
  35.  
  36.     cout<<"\nSPECIFICATII"<<endl;
  37.     cout<<a.specs.serie_sasiu<<endl;
  38.     cout<<a.specs.cai_putere<<endl;
  39.     cout<<a.specs.tractiune<<endl;
  40.     cout<<a.specs.numarusi<<endl;
  41.  
  42.     return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment