Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <stdio.h>
- #include <stdlib.h>
- int main() {
- FILE *s1, *s2;
- int symbol = 0, max = 0;
- s1 = fopen("bit.txt", "r");
- s2 = fopen("bit2.txt", "w");
- if (!s1)
- printf("Error open bit.txt\n");
- else
- {
- do
- {
- symbol = fgetc(s1);
- if (symbol >= 'a' && symbol <= 'z') {
- if (max == 0) max = symbol;
- if (max < symbol) max = symbol;
- }
- } while (symbol != EOF);
- fprintf(s2, "%c", (char)(max));
- }
- fclose(s1);
- fclose(s2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement