Quick actions

cmd+k|ctrl+k

Navigation

Languages

lab6 3

Snippet info

Language

Cpp

Visibility

public

Author

enifmankalinan

Created

2018-12-10T20:35:25Z

Updated

2018-12-10T20:35:25Z

#include <iostream>
#include <ctime>
#include <cstdlib>

using namespace std;

int main() {
    
    srand ( time(NULL) );
    int cars[29];
    
    for(int i = 0;i < 30;i++){
        cars[i] = rand() % 200 + 100;
        if(cars[i] > 200)
            cout << cars[i] << " л.с - мощность автомобиля превышает 200 л.с" << endl;
            else
                cout << cars[i]  << " л.с" << endl;
    }
    
    return 0;
}
INFO