TheRasVa

Задача 3,3

Mar 21st, 2015
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. // Задача 3,3.cpp: определяет точку входа для консольного приложения.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. using namespace std;
  7.  
  8.  
  9. int main()
  10. {
  11.     int n;
  12.     char a;
  13.     setlocale(LC_ALL, "russian");
  14.     cin >> n;
  15.     do
  16.     {
  17.         cin >> a;
  18.         if (a == '*') break;
  19.         a = (char)((int)a + n);
  20.         cout << a;
  21.     } while (true); /*(a != '*'); */
  22.     cout << endl;
  23.     system("PAUSE");
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment