//Testcase static void Main(string[] args) { Solution sol = new Solution(); int rand_num = new Random().Next(0, 1000); if (sol.IsPowerOfThree(rand_num)) { Console.Write(rand_num + " is power of three."); } else { Console.Write(rand_num + " isn't power of three."); } }