fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. char text;
  6. int countLetter = 0, flag = 1;
  7. while (flag == 0) {
  8. cin >> text;
  9. if ((text >= 'a' && text <= 'z') || (text >= 'A' && text <= 'Z')) {
  10. ++countLetter;
  11. } else {
  12. flag = 0;
  13. }
  14. if (flag == 0) {
  15. break;
  16. }
  17. }
  18. cout << countLetter;
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0.01s 5280KB
stdin
Bine ai venit
stdout
Standard output is empty