I am trying to understand the following Algorithm. It is a recursive algorithm but i am confused whether the two for loops are nested?

or firstiwill run3ntimes then condition forn>1will be checked.

This is pseudocode form, not exactly in C.

As far as I understand it, ifCode:PrintAs (n : integer) for i ← 1 to 3n do print(“A”) if n>1then: forj←1to4 doPrintAs[floor(n/3)]nis 3,iwill go from 1 to 9, thencondition for nwill be checked, since 3>1, PrintAs will be called recursively 4 times.

Please correct me if i am wrong.

thanks