Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <string.h>
- #include <fstream>
- using namespace std;
- char* s_insert(char* s, size_t m) {
- size_t n = strlen(s) + 1;
- char* t = s;
- const char* k = "eyuioa";
- for (; *s; ++s) {
- if (*s == 'a' || *s == 'e' || *s == 'y' || *s == 'u' || *s == 'i' || *s == 'o' || *s == 'A' || *s == 'E' || *s == 'Y' || *s == 'U' || *s == 'I' || *s == 'O') {
- ++s;
- if (!*s || (n >= m))
- memmove(s + 1, s, (n - (size_t)(s - t)) * sizeof(char));
- *s = ' *';
- }
- }
- return t;
- ofstream fout("C:\Users\Asus\Desktop\3_1C++.txt");
- cout << " Новая строка : " << t;
- fout.close();
- }
- int main(void) {
- char s[100];
- ifstream fin("C:\Users\Asus\Desktop\fxujk.txt");
- gets_s(s);
- puts(s);
- puts(s_insert(s, sizeof(s)));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement