当我扭转变种BA得到也扭转取悦一些人可以帮助我,感谢 using System;
using System.Collections.Generic;
public class Palindrome
{
public static void Main(string[] args)
{
Console.WriteLine(IsPalindrome("tysui")
为什么这个程序不能打印出“hello”?当我取消注释循环内部的行时,它可以工作。我想知道为什么字符串值没有被存储的概念。谢谢! #include<iostream>
using namespace std;
void reverse(string str) {
int length = str.length();
int x = length, i = 0;
我正在写一个函数来反转一个字符串,但直到最后它才完成。我在这里错过了什么吗? def reverse_string(str):
straight=list(str)
reverse=[]
for i in straight:
reverse.append(straight.pop())
return ''.join(reverse)
prin