Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.93 KB | None | 0 0
  1. // ConsoleApplication4.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <map>
  6. #include <iostream>
  7. #include <string>
  8. #include <vector>
  9. using namespace std;
  10. int main()
  11. {
  12.     /*ring imie;
  13.     int nr;
  14.     map<string, int> ksiazka;
  15.     ksiazka["patryk"] = 512477903;
  16.     while (true)
  17.     {
  18.         cout << "podaj imie:    " << endl;
  19.         cin >> imie;
  20.  
  21.         if (imie == "exit") {
  22.             break;
  23.             system("pause");
  24.         }
  25.         else if (ksiazka[imie] = !0)
  26.         {
  27.             cout << ksiazka[imie] << endl;
  28.  
  29.         }
  30.         else
  31.         {
  32.             cout << "podaj num tel:    ";
  33.             cin >> nr;
  34.             ksiazka[imie] = nr;
  35.         }
  36.     }
  37.         /*cout << "podaj imie:  " << endl;
  38.         cin >> imie;
  39.         cout << "podaj numer:   " << endl;
  40.         cin >> nr;
  41.         ksiazka[imie] == nr;
  42.     }*/
  43.  
  44.     // zad 2
  45.     string tekst;
  46.     int ileliterA;
  47.     cin >> tekst;
  48.     for (int i = 0; i < tekst.size(); i++)
  49.     {
  50.         if (tekst[i] = 'a')
  51.             ileliterA++;
  52.         else continue;
  53.     }
  54.    
  55.     return 0;
  56. }
  57.  
  58. //zad 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement