The problem is I want to write the pseudo-code (developed by C++ language) mentioned above.But I don't known how to type "{" or "}" on the lines 2, 8 and 10 of the algorithm. Using algorithm and algorithmic packages, on the line 4 of the algorithm "for" is coming with "do". So, is there a specific package to solve this problem ?