Can't seem to understand what's wrong with this program :(
#include
can you give what error the compiler is giving....
@aaddiittii
With no specific error, that just leaves general principals. Personally, I wouldn't get so cute with variable scoping like you have in middle(). You're using the same variable names in both the inner and outer for loops. I'm not 100% sure that those are different variables. I'm not sure if the scope is the for block, or if the scope is the function block and the inner loop is making the outer loop behave wrong. I'm surprised that there isn't a: std.cout << endl; between the other two cout's in middle. To be thorough, the namespace isn't declared.
Join our real-time social learning platform and learn together with your friends!