Answered step by step
Verified Expert Solution
Question
1 Approved Answer
50 learn.zybooks.com/zybook/UCRCS010AFall2023/chapter/5/section/8?content_resource_id=80264704 KS My library > CS 010A Introduction to Computer Science for Science, Math and Engineering I... > 5.8: Loops and strings BER 00
50 learn.zybooks.com/zybook/UCRCS010AFall2023/chapter/5/section/8?content_resource_id=80264704 KS My library > CS 010A Introduction to Computer Science for Science, Math and Engineering I... > 5.8: Loops and strings BER 00 Topic CHALLENGE ACTIVITY Matl 513635.3334012 g 3zqy7 Desr zy S x zy Secti Jump to level 1 5.8.1: Password requirements. Number of violations: 2 Remaining string: >*zP&n7LG6mX@$ Note: 789 1 #include 2 #include 3 using namespace std; 4 5 int main() { 6 string codeWord; int count; int idx; Zero ere to search 30% 21 E CH Grap Sy (-3x- 1111" is a string commonly found in weak passwords. Count the number of occurrences of "1111" in codeWord and remove all instances of "1111" from codeWord. Ex: If the input is 1111>*zP&n7LG6mX@$1111, then the output is: 5 IMG Paral IMG Diffe Aver Sy dom string find item) returns the index of the first occurrence of item in string. If no occurrence is found, then the function returns string_npos. string replace(indx, num, subStr) replace
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started