Advertisement
Kentoo

K#2

Dec 18th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.71 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4. #include <windows.h>
  5.  
  6. using namespace std;
  7.  
  8. void main()
  9. {
  10.     SetConsoleCP(1251);
  11.     SetConsoleOutputCP(1251);
  12.     string str, s = "Audi BMW Ford Honda Hyundai Kia Lada Mazda Mercedes-Benz Mitsubishi Nissan Renault Skoda Toyota Volkswagen Jeep Porsche Ferrari Bentley Bugatti Jaguar Lamborghini Maserati Peugeot Volvo Land Rover";
  13.     cout << "Введите интересующую вас марку машины" << endl;
  14.     getline(cin, str);
  15.     if (s.find(str) != string::npos) {
  16.         cout << "Такая марка машины найдена" << endl;
  17.     }
  18.     else {
  19.         cout << "Такая марка машины не найдена" << endl;
  20.     }
  21.     system("pause");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement