题目一:
题目描述
将一个字符串str的内容颠倒过来,并输出。str的长度不超过100个字符。
输入描述:
输入一个字符串,可以有空格
输出描述:
输出逆序的字符串
示例1
输入
复制
I am a student
输出
复制
tneduts a ma I
题目二:
题目描述
输入一个整数,将这个整数以字符串的形式逆序输出
程序不考虑负数的情况,若数字含有0,则逆序形式也含有0,如输入为100,则输出为001
输入描述:
输入一个int整数
输出描述:
将这个整数以字符串的形式逆序输出
示例1
输入
复制
1516000
输出
复制
0006151
题目三:
题目描述
接受一个只包含小写字母的字符串,然后输出该字符串反转后的字符串。(字符串长度不超过1000)
输入描述:
输入一行,为一个只包含小写字母的字符串。
输出描述:
输出该字符串反转后的字符串。
示例1
输入
复制
abcd
输出
复制
dcba
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string str1 = Console.ReadLine();
char[] list1 = str1.ToArray();
for (int i = 0; i < list1.Length / 2; i++)
{
char temp = list1[i];
list1[i] = list1[list1.Length - 1 - i];
list1