Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in
the string in c++
1 answer:
#include
#include
using namespace std;
int CountCharacters(char userChar, string userString){
int result = 0;
for(int i = 0;i if(userString[i] == userChar){
result++;
}
}
return result;
}
int main(){
string userString;
char userChar;
cin>>userChar>>userString;
cout< return 0;
}
You might be interested in
Answer:
Ada Lovelace
The first one!
Hope this helps!
Umm what? uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
you would be shocked, it can even kill you
Answer: when is not able to get up the stairs like a normal person
Explanation:
A. less dense air has a higher temperature