السلام عليكم
ممكن شرح شو المطلوب من هذا البرنامج؟ وكتابة الستيتمنت الطلوبه من البرنامج؟
البرنمج الاول:
Problem A: Counting
Complete the function TotalChars. TotalChars returns the total number of occurrences of the character ch in each string in list. You should use the string member function to find the number of characters in a string and s[k] for the value of the kth character (indexing starts at 0).
e.g. information technology : i=2, n=3, f=1, o=4, r=1, m=1, a=1, t=1, e=1,
c=1, h= 1, l= 1, g=1, y=1
You should write this function either recursively or iteratively (non-recursively).
البرنامج الثاني:
Problem B: Replicate
Write the function Replicate. Replicate adds new nodes to list so that nodes are replicated the number of times specified by parameter count. For example, if list is represented by:
("apple","cat","xray")
Then the call Replicate(list,3) should change list as shown below.
("apple","apple","apple","cat","cat","cat","xray","xray","xray")
