From the look at that "flowchart" shape I can assume that your program does not have a single if statement or loop.
It looks that somebody took program, butchered it to two-lines pieces and made a string of boxes each of which containing single piece. After that he bastardized lines even more to make it look like "pseudocede" and finally remembered that there is another shapes changed some of them to rhombuses without regard what is it actually means. Not to mention adding random "yes" to the lines and do not adding them to the only place where they would be nessesary.
As MiiNiPaa says, its obvious that code came before thought. you cant hand that in mate,
the shapes are all correct flow chart shapes, rectangles, diamonds etc joined together by arrows to indicate flow, BUT t's reduced to giberish by what was written in the shapes.
You and your friend need to dry run that chart so that you understand whats wrong with it. You also need to check how to represent loops and switches in a flowchart.
Flowchart is a simplified algorithm which tells what to do. All point of flowchart is to be simple enough that monkey could follow it. If you need to explain a flowchart, it is not a correct flowchart. Not to mention that whoever did that abomination does not have a slightest idea how flowchart works.
Oh. It might not loop indefinetly depending where missing closing bracket '}' is. I made my assumptions from identation, but it actually either loop indifinetly or wrecks random memory.
The more I look at the program the more mistakes I find. It was clearly written without thought. That is why you should write flowchart before coding.
Humem, the problem here is that the program doesn't work and the flow chart doesn't reflect what the program should do. In fact, the flow chart isn't even a real flow chart.
- in the first diamond, which branch is for yes, and which is for no? It looks like you expect the left branch for "yes".
- In the second diamond, you show the flow going INTO the left side - flow should go in the top. Also, this is a branch but it shows only one exit.
- The two "else" boxes show a "yes" exit. Those should be reserved for decisions.
- I don't know what's going on with the for loops.
You need to get the code and the flow chart to accurately reflect the solution to the problem. MiiniPaa's flow chart is a good example for the first part.
For what it's worth, I find flow charts pretty useless for expressing algorithms. Pseudo code is much more useful because it reflects the structure that will become code.