for(int i=1; i<=n; i++){
prints out n amount of
for(int i=1; i<=n; i+=3){
prints out until n
for(int i=1; i<=n; i++){
System.out.println(i);
Type: Posts; User: miss confused
for(int i=1; i<=n; i++){
prints out n amount of
for(int i=1; i<=n; i+=3){
prints out until n
for(int i=1; i<=n; i++){
System.out.println(i);
I'm being asked to print out in lets just say upByThree(4) four of the numbers in the following sequence of my code. With my code, I can either write that code up to a certain number or have it less...
Consider the sequence 1, 4, 7, 10, 13. The sequence starts at 1, and adds 3 to get the next value. Write a method called upByThrees, which prints the first n numbers in this sequence in a column.
...