My code below skips integer parameters when I run it, can you show me how to stop…
Jump to turn (6)
- 1My code below skips integer parameters when I run it, can you show me how to sto
- 2The steps variable is not the issue. How do I get my program to stop skipping ev
- 3How do i check for overflow?
- 4My code already has those features. It still does not detect overflow.
- 5The code below does not detect overflow. Please point out how to detect overflow
- 6How do I show my last value in the collatz function
- User
My code below skips integer parameters when I run it, can you show me how to stop skipping parameters? I think the error is in the else loop of the main function: #include #include using namespace std;
// Recursive function to calculate 3n+1 int collatz(int n, int &steps, int &maximum, int &odds, int &evens){ //Check for int overflow cout << "->(" << n << ") ";
code