a write the algorithm to concatenate two given string
Chat with our AI personalities
please give me an algorithm and a corresponding flow chart that displays list of numbers from 1 to 20.
write an algorithm to compute the weekly average rainfall given the daily rainfall for four weeks
algorithm GCD (a, b) is:while (a b) doif a > b then a := a - b else b := b - aend whilereturn a
I cannot do your homework, if you cannot explain it properly.
You can write any algorithm in any way you like. Many prefer pseudocode or flowcharts, others use prose or more formalized methods. For example, if you wanted to describe an algorithm to count the number of occurrences of a given item I in a given list L, I would propose the following pseudocode: let counter be 0. let the current item C be the first item in list L. while C == valid { if C matches I then increment counter set C to the next item in the list } return counter.