ZOJ 1295 Reverse Text
来源:互联网 发布:微信java模板消息demo 编辑:程序博客网 时间:2024/05/22 12:18
In most languages, text is written from left to right. However, there are other languages where text is read and written from right to left. As a first step towards a program that automatically translates from a left-to-right language into a right-to-left language and back, you are to write a program that changes the direction of a given text.
Input Specification
The input contains several test cases. The first line contains an integer specifying the number of test cases. Each test case consists of a single line of text which contains at most 70 characters. However, the newline character at the end of each line is not considered to be part of the line.
Output Specification
For each test case, print a line containing the characters of the input line in reverse order.
Sample Input
3
Frankly, I don't think we'll make much
money out of this scheme.
madam I'm adam
Sample Output
hcum ekam ll'ew kniht t'nod I ,ylknarF
.emehcs siht fo tuo yenom
mada m'I madam
就是考察字符串。
AC代码:
#include<stdio.h>#include<string.h>int main(){int n,al,i; char a[100];while(scanf("%d",&n)!=EOF){getchar(); while(n--){gets(a); al=strlen(a); for(i=al-1;i>=0;i--)printf("%c",a[i]);printf("\n");}}return 0;}
- zoj 1295 Reverse Text
- zoj 1295 Reverse Text
- ZOJ 1295 Reverse Text
- ZOJ 1295 Reverse Text
- ZOJ 1295: Reverse Text
- ZOJ - 1295 - Reverse Text
- ZOJ 1295 - Reverse Text
- ZOJ - 1295 Reverse Text
- ZOJ Problem Set - 1295 Reverse Text
- ZOJ 1295: Reverse Text - cin.getline()
- ZOJ Problem Set - 1295 Reverse Text
- ZOJ 1295——Reverse Text
- ZOJ Problem Set - 1295 Reverse Text
- zoj 1295.Reverse Text
- 1295 Reverse Text
- Reverse Text
- Reverse Text
- Reverse Text
- struts2.1 datetimepicker日期控件的使用http://huibin.iteye.com/blog/674738
- 由用户输入年份,月份,并计算在该月份之前共多少天
- 特色在哪?深度剖析3D游戏画面
- nandflash yaffs2 oob
- hdu4405 Aeroplane chess---金华网络赛 期望
- ZOJ 1295 Reverse Text
- c++返回临时变量的疑惑 返回常量c风格字符串
- 2012年9月22日 金华网络预赛 D题 结题报告——子集划分,数学
- 3D游戏图形技术解析
- opencv中如何把位图数据附加到IplImage对象
- C语言socket编程模型
- 游戏元素剖析
- GPS定位原理
- 算法素养挑战组