Advertisement
omegapharma

Untitled

Feb 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <cctype>
  3. #include<iostream>
  4. using namespace std;
  5. int main()
  6. {
  7. unsigned char znak;
  8. int d = 0, c = 0, s = 0;
  9. do
  10. {
  11. cin >> znak;
  12.  
  13. if (isupper(znak)) d++;
  14. else if (isdigit(znak)) c++;
  15.  
  16. s++;
  17.  
  18. } while (znak != 'k');
  19.  
  20. cout << "Znaki: " << --s << endl;
  21. cout << "Duze litery: " << d << endl;
  22. cout << "Cyfry: " << c << endl;
  23.  
  24. system("PAUSE");
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement