Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdint.h>
- #include <string.h>
- void task_01(FILE* in, FILE* out) {
- char letters[] = "aeiouy";
- printf("%lu\n", sizeof(letters));
- int cur_char;
- int last = 0;
- while ((cur_char = fgetc(in)) != EOF) {
- if (strchr(letters, cur_char)) {
- if (last != cur_char) {
- last = cur_char;
- fputc(cur_char, out);
- }
- } else {
- last = 0;
- fputc(cur_char, out);
- }
- }
- }
- int main(int argc, char** argv) {
- char filename1[20];
- char filename2[20];
- scanf("%s", filename1);
- scanf("%s", filename2);
- FILE* in = fopen(filename1, "r");
- FILE* out = fopen(filename2, "w");
- task_01(in, out);
- fclose(in);
- fclose(out);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement