当前位置:网站首页>reading order
reading order
2022-07-29 17:15:00 【seal ink】
阅读顺序
Most languages are read from left to right.但是,在一些语言中,Reading order is from right to left.This adds a lot of trouble to language communication.现在,请你编写一个程序,It can automatically convert a text written from left to right to the order from right to left.
Input
输入的第一行是一个数字n(n<100),接下来的有nline of text,由字母、空格、numbers and various punctuation marks,The length of each line of text does not exceed200个字符.
Output
Convert the entered text into right-to-left order,One line of input corresponds to one line of output.
Sample Input
3
a man a plan a canal panama
Frankly, I don’t think we’ll make much
OK?
Sample Output
amanap lanac a nalp a nam a
hcum ekam ll’ew kniht t’nod I ,ylknarF
?KO
Hint
If the spaces between words are not considered,Reading the first sentence from left to right is the same as reading right to left:-)
#include<stdio.h>
#include<string.h>
int main()
{
int N;
char a[201];
char b[201];
scanf("%d",&N);
getchar();
while(N--)
{
gets(a);
int len=strlen(a);
for(int i=0;i<len;i++)
{
b[len-1-i]=a[i];
}
for(int i=0;i<len;i++)
printf("%c",b[i]);
printf("\n");
}
return 0;
}
边栏推荐
- 中国厂商统治印度智能手机市场,份额提升至77%
- 干货!如何使用仪表构造SRv6-TE性能测试环境
- [Server Storage Data Recovery] A data recovery case of a RAID 5 crash caused by the failure of a certain model of Huawei OceanStor storage RAID 5 hard disk and the failure to synchronize data with the
- 【高并发】我用多线程进一步优化了亿级流量电商业务下的海量数据校对系统,性能再次提升了200%!!(全程干货,建议收藏)
- [PCL study notes] Commonly used libraries and APIs for point cloud processing (PCL library Eigen)
- (笔记)Build was configured to prefer settings repositories over project repositories but 解决方法
- 一文参透分布式存储系统Ceph的架构设计、集群搭建(手把手)
- Knowledge map construction whole process
- 【地形】【虚拟纹理】地形虚拟纹理技术介绍
- 【翻译】设备管理器—英特尔网卡属性设置高级选项的功能
猜你喜欢
如何在C语言中定义自己的数据类型?
Query term weights, search term weighting
Chicken and rabbit in the same cage
Groeb - "gramm, explicit and complete n -" gramm mask language model, implements the explicit n - "gramm semantic unit modeling knowledge.
设置工作模式与环境
Review | Tech Talk activities based on Amazon KVS create intelligent visual products
MLX90640 红外热成像仪开发笔记(九)
58 security - image quality assessment technology practice
Quantitative Finance
(笔记)Build was configured to prefer settings repositories over project repositories but 解决方法
随机推荐
1802. 有界数组中指定下标处的最大值【贪心 +二分】
pjax无法生效解决办法,butterfly主题维护你的pjax
[PCL study notes] Commonly used libraries and APIs for point cloud processing (PCL library Eigen)
(notes) Build the was configured to -- Settings repositories over project repositories but solutions
传输层 TCP的连接管理-释放连接四次握手
[C language brush questions] Explanation of the use of linked lists
MLX90640 红外热成像仪开发笔记(九)
量化初级 -- akshare获得股票代码,最简策略
虚拟远程桌面
How CRM Helps Enterprise Marketing Acquire Customers
58安全-图像质量评价技术实践
Tech Talk 活动回顾|基于 Amazon KVS 打造智能视觉产品
718. 最长重复子数组
中小型金融企业该如何进行灾备建设?
动态规划 爬楼梯
重磅来袭!豆瓣评分9.9,万人血书的多线程与高并发v2.0版本
浅谈程序的内存布局
zabbix email sends alert information
LinkedList 5-141. 环形链表
【微信小程序】组件使用及属性参考