How would the remaining cases look like? I sorta remember my instuctor talking about using either division or modulo(%)?
Type: Posts; User: Dylan Metz
How would the remaining cases look like? I sorta remember my instuctor talking about using either division or modulo(%)?
Here is what I have so far:
#include <iostream>#include <string>
using namespace std;
//recursive function prototype
string intToStr(int n);
So it would be like this? if(n==0) return 0?
How would you return it as a string? Also could you also provide some advice on the main function? Would I be using the same main function as I did for...
Not sure about static variables. As for intToStr. I haven't started it yet. I would like some help with the base case of the recursive part.
We are not allowed to use any functions that are similar to atoi or itoa. We also cannot use for or while.
This is my other function that converts the string to an integer:
int...
I already completed one part of the assignment, but need help on the other part. The assignment was to create two recursive functions. One that converts strings to integers ( which i completed) and...