Zadania z dziś

This commit is contained in:
2022-11-09 17:10:49 +01:00
parent 4f1dff7e51
commit 095e7c102c
5 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#include <iostream>
#include <string>
int miernikkrzyku(std::string wejscie){
int counter = 0;
for (char znak : wejscie){
if (znak == 'a'){
counter++;
}
}
return counter;
}
int main(int argc, char *argv[])
{
std::cout << miernikkrzyku("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") << std::endl;
}