Okay so i thought i would get a jumpstart on my homework for my CPS181 (Data structures) course. I got an assignment that contains 4 problems each having to do with the one before (like 2 continues...
Type: Posts; User: Jnoobs
Okay so i thought i would get a jumpstart on my homework for my CPS181 (Data structures) course. I got an assignment that contains 4 problems each having to do with the one before (like 2 continues...
I also need to do these but dont understand the question
and finally:
Doesnt print results; here is my code:
System.out.print("\nProblem 6 (Enter a positive number): ");
I dont understand what you mean
My Recursive output needs to be the same as my iterative Output, but it isnt outputting the same way.
Oh, i forgot about that
but now that i tried incorporating the call it still doesnt work.
public static int Recursion(int n) {
int result = 1, num;
num = n/10;
I ran into a problem with my code. My Iterative works but my Recursion isnt.
public static int Recursion(int n) {
int result = 1, num;
num = n/10;
if(n == 0) {
result = 1;...
That makes a lot of sense, thank you.
What about recursively?
Im writing a program that takes a number inputed and prints the first n positive numbers beginning at 0 by 10's, separated by spaces.
For example: n=4 prints 0, n=65 prints 0 10 20 30 40 50 60
...