Загрузка...

Completed task B, check if you did it right?

Thread in C/C++ created by KASPAY Apr 28, 2021. 133 views

  1. KASPAY
    KASPAY Topic starter Apr 28, 2021 657 Aug 11, 2019
    [IMG]

    Сделал задание Б , проверьте правильно ли ?

    Code

    [/CENTER]
    #include <iostream>
    #include <cstdlib>
    #include<cstdio>
    using namespace std;

    struct Distance
    {
    int meters;
    };
    struct Room
    {
    Distance length;
    Distance width;
    };

    int main()
    {
    setlocale(LC_ALL, "Russian");
    Room kitchen, hall;

    kitchen.length.meters = 20;
    kitchen.width.meters = 40;

    hall.length.meters = 40;
    hall.width.meters = 80;

    cout << "Длина кухни равна: " << kitchen.length.meters << " ширина равна " << kitchen.width.meters;
    cout << "Длина зала равна: " << hall.length.meters << " ширина равна " << hall.width.meters;
    return 0;
    }

    [CENTER]
    Извиняюсь за то что весь код по центру получился ((​
     
  2. ReverseFlash
    ну да
     
  3. KASPAY
    KASPAY Topic starter Apr 28, 2021 657 Aug 11, 2019
    Спс тебе добрый человечек ))
     
Top
Loading...