dlrow !olleh
来源:互联网 发布:java api管理系统 编辑:程序博客网 时间:2024/06/05 18:29
#include <iostream>
#include <string>
using namespace std;
int main()
{
char a[1100];
int i,j,n;
cin >> n;
getchar(); //可以吸收一个空行
for(j = 0; j < n; j++)
{
gets(a); //会产生空行
for(i=strlen(a)-1;i>=0;i--)
{
cout<<a[i];
}
cout<<endl;
}
return 0;
}
#include <string>
using namespace std;
int main()
{
char a[1100];
int i,j,n;
cin >> n;
getchar(); //可以吸收一个空行
for(j = 0; j < n; j++)
{
gets(a); //会产生空行
for(i=strlen(a)-1;i>=0;i--)
{
cout<<a[i];
}
cout<<endl;
}
return 0;
}
- dlrow !olleh
- hello world 输出 olleh dlrow
- JavaScript翻转字符串,把hello world. 变成 dlrow. olleh
- 写一段代码将Hello World转换成dlroW olleH。
- 字符串翻转集合, case1, hello world->world hello; case2, hello world->olleh dlrow
- 字符串翻转集合, case1, hello world->world hello; case2, hello world->olleh dlrow
- 对输入的字符串进行反转并显示结果,例如输入字符串为hello,则程序应输出olleh。
- oracle 内存分配和调优 总结
- 海量数据处理的几种方法总结
- 生活随笔:公司聚餐
- Ubuntu 11.04下KScope的安装
- C语言malloc用法
- dlrow !olleh
- 关于rac node驱逐
- 关于Flex+json+Java的整合开发【连载二】- Java处理Json数据
- eclipse安装maven插件
- PHP中实现换行
- gnu build tools(automake ...) 指导
- 编码规范-命名规范
- 由py2exe引发的问题及解决方案
- 将数字转换成图片的代码