Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Символ
- char t;
- //Ввод
- cin >> t;
- //Вывод
- cout << t;
- //Проверка, что буква...
- if (isalpha(t)) {
- //....
- }
- //Проверяет, что цифра
- if (isdigit(t)) {
- //....
- }
- //Проверяет, что буква большая
- if (isupper(t)) {
- //....
- }
- //Проверяет, что буква маленькая
- if (islower(t)) {
- //....
- }
- //Сделает букву маленькое
- t = tolower(t);
- //Сделает букву большой
- t = toupper(t);
- string a;
- //Считывает строку до пробела
- cin >> a;
- //Считает строку до \n
- getline(cin, a);
- cout << a;
- string str;
- //Считывает строку до пробела
- cin >> str;
- //Считает строку до \n
- int count = 0;
- for (int i = 0; i < str.size(); i++) {
- if (isdigit(str[i])) {
- count++;
- }
- }
- cout << count;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement