4. Count Consonants
Lesson 5 of 31 in Coddy's 30 Days of Logic Building in C++ course.
Challenge
EasyWrite a function to count the number of consonants in a given string.
- Input: "hello"
- Output: 3
Try it yourself
#include <string>
using namespace std;
int countConsonants(string str) {
// Write code here
}All lessons in 30 Days of Logic Building in C++
1Introduction
Introduction