Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int BS = int.Parse(Console.ReadLine());
- int chislo = int.Parse(Console.ReadLine());
- string[]stack = new string[100];
- string stack1="";
- int ind = 0;
- while(chislo>=BS)
- {
- int promenliva = chislo % BS;
- stack[ind] = promenliva.ToString(); //String.Copy(Convert.ToString(promenliva, 5));
- ind++;
- chislo = chislo / BS;
- }
- stack[ind] = chislo.ToString();
- for (int i = ind; i >= 0; i--) stack1 = stack1 + stack[i];
- Console.Write(stack1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement