Answer to Question #299127 in C++ for Yaku

Question #299127

please find the question on below link:



https://drive.google.com/file/d/17pfgTzAo5QxJ0K511KVR59WrywFI6iyH/view?usp=sharing

1
Expert's answer
2022-02-20T15:39:19-0500
int is_abb(char *str) {
  int ok = 1;
  for (int i = 0; i < str_len(str); i++) {
    if (str[i] == 'a' && ok) continue;
    if (str[i] == 'b') ok = 0;
    else return false;
  }
  return true;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog