Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<math.h>
- using namespace std;
- int main()
- {
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- char input;
- int count = 0;
- char mas[256];
- bool flag = true;
- while (!feof(stdin))
- {
- scanf("%c", &input);
- for(int i=0; i<256; i++)
- {
- if(input == mas[i])
- flag = false;
- }
- if(flag)
- {
- mas[count] = input;
- count++;
- }
- flag = true;
- }
- cout << count+2; // Прибавляю 2, т.к. конец строки это 2 символа
- fclose(stdin);
- fclose(stdout);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement