0

upfront This is homework so i'm not asking you to do it for me because then I would never learn. What i'm hoping you can do is just talking me through a few things and see i'm on the right path.

We were already given a function that inputs a number from a user, converts it to a string and returns it to main.

I need to search that string (up to 1000 numbers right of the decimal point) to see if any numbers or series of numbers repeat, the number must have at least 10 digits worth of repeated stuff.

What i'm thinking I'm thinking I'm going to need to put the string into a string array, load the first ten digits in, search the entire string for a repeat, reload the string (moving the array over to the right one) and repeat until I get to the end of the string.

Of course I'll need to build in a break incase a repeating pattern is found.

Am I way off on this? I'm only curious because my friend in the same class says this isn't right.

Thanks in advance.

-Paul

pdsnowden
  • 37
  • 5
  • code your thinking. Then if it doesn't work try to recognize the problem and solve it. After that if you fail to do, post here what you tried. Only then here members can help you. Hope you'll solve by yourself. – Shafi Feb 02 '16 at 18:55
  • understood, thanks for the time. – pdsnowden Feb 02 '16 at 18:57

0 Answers0