-
Replied To a Post in Main Function Print out
Much apprecited. I was able to get it done. v/r -
Created Main Function Print out
Below is my code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; ///////////////////////////////////////////////////////////////////////// /* // struct Edge // Represent one edge in the graph. Fields contain // … -
Began Watching Main Function Print out
Below is my code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <iostream> using namespace std; ///////////////////////////////////////////////////////////////////////// /* // struct Edge // Represent one edge in the graph. Fields contain // … -
Replied To a Post in Equivalence Relation Manager
Copy that, I'm on it. -
Replied To a Post in Equivalence Relation Manager
Now I'm running into the issue of multiple definitions in code::blocks, but I think that comes down to how I'm linking the files (I'll figure that out). What do you … -
Replied To a Post in Equivalence Relation Manager
I'll definitely include the return false, thank you. -
Marked Solved Status for Bump in the Road
Good morning everyone, The library will be home, 0800 till 2100. I've been working on trying my loops in my hailstone sequence into recursions. It seem recursion can easrier to … -
Replied To a Post in Equivalence Relation Manager
Actually the above is not the right direction. What do you think of this: /* // bool equivalent(int* R, int x, int y) // Returns true if x and y … -
Replied To a Post in Equivalence Relation Manager
Understood. I was looking over the equivalent function, below is what I came up with: /* // bool equivalent(int* R, int x, int y) // Returns true if x and … -
Replied To a Post in Equivalence Relation Manager
Understood. I decided to leave out the header file completely, and just focus on a file that only contains the function definitions. I'll use NoMachine to run all three files … -
Replied To a Post in Equivalence Relation Manager
Let re work the code in my last respone to this: int* newER(int n) { int ER [n + 1]; int *R = ER; for(int index = 1; index <= … -
Replied To a Post in Equivalence Relation Manager
@AssertNull second response Yea, I didn't know we could do that, I was going off of the examples in class. Also, should I leave the header alone, and put my … -
Replied To a Post in Equivalence Relation Manager
@ AssertNull first response: Yea, I found out yesterday evening during his class that the header file can contain the function definitions. At first I thought that the header would … -
Gave Reputation to AssertNull in Equivalence Relation Manager
Not the question you asked, but again, if there is no reason to have temp, get rid of it. int newER(int n) { int* R = new int[n]; int temp … -
Replied To a Post in Equivalence Relation Manager
Or for the first funtion: int newER(int n) { int* R = new int[n]; int temp = 1; for (int index = 1; index == n; index++) { R[index] = … -
Created Equivalence Relation Manager
Good afternoon, I have to create a program to only be used as a tool (no main function). Below is the background information related to task: Your goal for this … -
Began Watching Equivalence Relation Manager
Good afternoon, I have to create a program to only be used as a tool (no main function). Below is the background information related to task: Your goal for this … -
Replied To a Post in Bump in the Road
I was using pencil and paper. I translated what I wrote down to this post. I then used hand simulation afterwards to see if it would work through recursion. The … -
Replied To a Post in Bump in the Road
Is the issue with the variable 'steps'? v/r -
Replied To a Post in Bump in the Road
**Correction** testing it -
Replied To a Post in Bump in the Road
Well with the factorial, I just keep ruturning 0. I decided to change my base line to 'steps'. int initialcomp_Num(int n) { //Variable Declaration. int m = n-1, steps = … -
Replied To a Post in Bump in the Road
What do you all think about a factorial? -
Replied To a Post in Bump in the Road
.........................blowing my mind is right. Knocked out my philosophy exam yesterday, 44 out of 50. Was stressing a bit over it all day yesterday. I emailed my professor and apparently … -
Replied To a Post in Bump in the Road
You're example is very clear! Thank you for that. -
Replied To a Post in Bump in the Road
I was doing a hand simulation. I just picked a random number to start off with. -
Replied To a Post in Bump in the Road
I'm now doing hand simualtion for that function. I'm currently having an inception moment. so n = 8 8 <=1, no max is then (8, 4) so n = 2 … -
Replied To a Post in Bump in the Road
Wow, I didn't know I could call it like that. My problem (among other things) in regards to this situation, is not knowing what I'm unable to do and what … -
Replied To a Post in Bump in the Road
Not quite understanding. The function next(int n) isn't recursive. -
Replied To a Post in Bump in the Road
Here is what I came up with: int sequence_Max(int n) { //Variable Declaration. int high = n, low = next(n); if (n <= 1) { return 1; } //Base case. … -
Edited Bump in the Road
Good morning everyone, The library will be home, 0800 till 2100. I've been working on trying my loops in my hailstone sequence into recursions. It seem recursion can easrier to … -
Edited Bump in the Road
Good morning everyone, The library will be home, 0800 till 2100. I've been working on trying my loops in my hailstone sequence into recursions. It seem recursion can easrier to … -
Created Bump in the Road
Good morning everyone, The library will be home, 0800 till 2100. I've been working on trying my loops in my hailstone sequence into recursions. It seem recursion can easrier to … -
Began Watching Bump in the Road
Good morning everyone, The library will be home, 0800 till 2100. I've been working on trying my loops in my hailstone sequence into recursions. It seem recursion can easrier to … -
Marked Solved Status for Recursion in C++
Good evening everyone, Does any one have a reference/videos/tutorials on how to use recursion effecitely in C++? v/r -
Created Recursion in C++
Good evening everyone, Does any one have a reference/videos/tutorials on how to use recursion effecitely in C++? v/r -
Began Watching Recursion in C++
Good evening everyone, Does any one have a reference/videos/tutorials on how to use recursion effecitely in C++? v/r -
Marked Solved Status for Hailstone Sequence so far
Good afternoon everyone, I'm currently working towards to provide the following output for my code: What number shall i start with? 7 The hailstone sequence starting at 7 is: 7 … -
Replied To a Post in Hailstone Sequence so far
LOL understood @JamesCherrill -
Replied To a Post in Hailstone Sequence so far
I figured it out. Also, is there a limit to accuracy of the sequence? -
Replied To a Post in Hailstone Sequence so far
So I gave topValue and initial value of 0. Now the problem seems to be the if statement in the for loop. I have to figure out what to do … -
Replied To a Post in Hailstone Sequence so far
When entered 9, I got a huge number at the end. I was able to see in noMachine this error: g++ -Wall -Wshadow -Wuninitialized -O -o hailstone hailstone.cpp hailstone.cpp: In … -
Replied To a Post in Hailstone Sequence so far
@AssertNull I remember you pointing out that when you inputted a certain value, that the last function in my program would give you an incorrect number. I'm not sure what … -
Replied To a Post in Hailstone Sequence so far
Appreciat the advice everyone. I'll keep the information in mind. -
Replied To a Post in Hailstone Sequence so far
The professor doesn't like to see the starting parameters change value in the function (same with the noncomment lines requirement). I'm not sure if this is a real world thing, … -
Replied To a Post in Hailstone Sequence so far
Nevermind, I figured out the issue. For one, I need some sleep. Below is the recovery: int sequence_Max(int n) { //Variable Declaration. int max = n, temp = n; //temp … -
Replied To a Post in Hailstone Sequence so far
@AssertNull Yes the brackets do not count for non-comment line. When I entered 7, it worked fine. I reworked all of the contacts to explain only what the function does, … -
Replied To a Post in Hailstone Sequence so far
Oh wow, definitely a typo! I'll change that. I figured out what was wrong. Here is the code for the function below: int initialcomp_Num(int n) { int count, initial, start; … -
Replied To a Post in Hailstone Sequence so far
Not sure what I'm doing wrong, I get this output: What number shall I start with? 8 The hailstone sequence starting at 8 is: 8 4 2 1 The length … -
Replied To a Post in Hailstone Sequence so far
@AssertNull Currently the sequence_Comparasion function works. I'll see what I can do about the start variable. -
Replied To a Post in Hailstone Sequence so far
***Last stretch before code contracts reveiw*** Good aftnoon everyone, I'm currently stuck on the last function needed for this program. Below is the intended function discription: Takes an integer and …
The End.