Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- Console.WriteLine("26進数に変換したい数字を入れてください。");
- string str = Console.ReadLine();
- int value = int.Parse(str);
- List<char> vs = new List<char>();
- for(;value > 0; value /= 26) {
- int keta = value % 26;
- vs.Add((char)((int)'A' + keta));
- }
- vs.Reverse();
- Console.WriteLine(vs.ToArray());
- Console.ReadLine();
- }
Advertisement
Add Comment
Please, Sign In to add comment