Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. // Pismenka.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <string>
  7.  
  8. using namespace std;
  9. std::string _retezec;
  10.  
  11. int _tmain(int argc, _TCHAR* argv[])
  12. {
  13.     char znak[5][5] = { { 'A', 'F', 'K', 'P', 'U' }, { 'B', 'G', 'L', 'Q', 'V' }, { 'C', 'H', 'M', 'R', 'X' }, { 'D', 'I', 'N', 'S', 'Y' }, { 'E', 'J', 'O', 'T', 'Z' } };
  14.  
  15.     int horni, spodni;
  16.  
  17.     while (true)
  18.     {
  19.         cout << "Horni:  ";
  20.         cin >> horni;
  21.         cout << "Spodni: ";
  22.         cin >> spodni;
  23.  
  24.         if (spodni == 0)
  25.             _retezec += ' ';
  26.         else
  27.         {
  28.             _retezec += znak[horni-1][spodni-1];
  29.         }
  30.  
  31.         cout << _retezec << endl;
  32.     }
  33.    
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement