Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- public class DivSeven
- {
- static int counter=1;
- static long[] final = null;
- public static long[] Seven(long m)
- {
- string number = m.ToString();
- long x = int.Parse(number.Last().ToString());
- long first = (long)(m * Math.Pow(10, -1));
- long result = first - (2 * x);
- if (result.ToString().Length > 2)
- {
- counter++;
- Seven(result);
- }
- else
- final = new long[] { result, counter };
- return final;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement