Advertisement
chevengur

Вводный курс: основы C++ | Урок 2: Создание и применение вектора 1/3

Aug 28th, 2023
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     vector<int> month_lengths = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
  8.     int number_month;
  9.     cin >> number_month;
  10.     cout << month_lengths[number_month];
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement