Write a program, using nested loop that print the following output: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5
What language are you using and how far did you get? For pasting code, you can use a code past site like http://dpaste.com/ or http://pastebin.com/ For small bit of code, you can even use ``` (the one with the ~) above and below it to get: ``` dim some_function(x): x = x + 5 return x ``` Works great for displaying small things.
If you observe that number of columns are depended on the row number So if we have a nested loop for(1=1;i<=5,i++) for (j=1;j<=i;j++) print(j) print ('\n')
I was using java programming in netbeans. I'm really new to programming and we just started learning the basics. Thank you very much for your help. Thank you very much for your responses. It helped me do my assignment. :)
Join our real-time social learning platform and learn together with your friends!