Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <cctype>
- #include<iostream>
- using namespace std;
- int main()
- {
- unsigned char znak;
- int d = 0, c = 0, s = 0;
- do
- {
- cin >> znak;
- if (isupper(znak)) d++;
- else if (isdigit(znak)) c++;
- s++;
- } while (znak != 'k');
- cout << "Znaki: " << --s << endl;
- cout << "Duze litery: " << d << endl;
- cout << "Cyfry: " << c << endl;
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement