Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- using namespace std;
- void strochka(char *str, int length)
- {
- int i;
- for ( i = 0; i < length; i++)
- {
- if (int(str[i]) == 97) str[i] = char(42);
- if (str[i] >= '0' && str[i] <= '9')
- str[i] = '#';
- }
- cout << str;
- }
- int main()
- {
- setlocale(LC_ALL, "RUS");
- char stroka[256];
- int n;
- cout << "Введите строку из символов" << endl;
- cin.getline(stroka, 256);
- n = strlen(stroka);
- cout << endl;
- strochka(stroka,n);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment