How to find all lowercase characters in a string with C++

1 Answer

0 votes
#include <iostream>

int main() {
    char str[] = "JavaScript C C++ NodeJS Python";

    for (int i = 0; str[i]; i++) {
        if (str[i] >= 'a' && str[i] <= 'z')
            std::cout << str[i] << ' ';
            
    }
}





/*
run:

a v a c r i p t o d e y t h o n 

*/

 



answered Apr 20, 2022 by avibootz

Related questions

1 answer 103 views
1 answer 124 views
1 answer 122 views
1 answer 137 views
1 answer 130 views
2 answers 155 views
1 answer 109 views
...