Guest User

Untitled

a guest
Nov 18th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. char str(char *str[]) {
  2. int j = 0;
  3. for (int i = 0; i < sizeof(str) / sizeof(*str); i++) {
  4. if (str[i] == "a") {
  5. j++;
  6. }
  7. }
  8.  
  9.  
  10. return j;
  11. }
  12.  
  13.  
  14. Вызов функции в main.
  15. cout << str("saassssasasasass") << endl;
  16.  
  17. char str(char *str[]) {
  18.  
  19. char str(char const * str) {
  20.  
  21. if (str[i] == "a") {
  22.  
  23. if (str[i] == 'a') {
  24.  
  25. for (int i = 0; i < sizeof(str) / sizeof(*str); i++) {
  26.  
  27. for (int i = 0; i < strlen(str); i++) {
  28.  
  29. int str(const char *str)
  30. {
  31. int count = 0;
  32.  
  33. for(; *str; str++)
  34. if (*str == 'a') ++count;
  35.  
  36. return count;
  37. }
Add Comment
Please, Sign In to add comment