Advertisement
Evgeniy175

Untitled

Nov 25th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     setlocale(LC_CTYPE, "Russian");
  6.     char S[500];
  7.     int i=0, n;
  8.     cout << "Введите строку: ";
  9.     cin >> S;
  10.     cout << "С какого символа: ";
  11.     cin >> n;
  12.     n -= 1;
  13.     do
  14.     {
  15.         if (i == n)
  16.         {
  17.             do
  18.             {
  19.                 cout << S[i];
  20.                 i++;
  21.             } while (S[i] != '\0');
  22.         }
  23.         i++;
  24.     } while (S[i] != '\0');
  25.     system("pause");
  26.     return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement