当前位置:网站首页>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;
}
边栏推荐
- PL5902 SOT-23-5 高效1MHz2A同步DC-DC降压调节器 百盛电子代理商
- 1802. 有界数组中指定下标处的最大值【贪心 +二分】
- 节省70%的显存,训练速度提高2倍!浙大&阿里提出在线卷积重新参数化OREPA,代码已开源!(CVPR 2022 )...
- 【微信小程序】组件使用及属性参考
- [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
- mysql的sql分页查询语句怎么写_sql 分页查询语句(mysql分页语句)「建议收藏」
- [极客大挑战 2019]LoveSQL 1
- 召回 i2i
- 如何写好设计文档
- 路由ISIS
猜你喜欢

How should small and medium-sized financial enterprises carry out disaster recovery construction?

掘金量化:通过history方法获取数据,和新浪财经,雪球同用等比复权因子。不同于同花顺

query词权重, 搜索词权重计算

This article penetrates the architecture design and cluster construction of the distributed storage system Ceph (hands-on)

SR-TE的功能架构概述

一文参透分布式存储系统Ceph的架构设计、集群搭建(手把手)

Turbine聚合监控

Ernie-gram, 显式、完备的 n-gram 掩码语言模型,实现了显式的 n-gram 语义单元知识建模。

面试官:MySQL如何根据执行计划调优SQL语句?

MUD DAO火爆入世,DAO主轮募集蓄势待发
随机推荐
Kubernetes 的 5 个误区
面试官:MySQL如何根据执行计划调优SQL语句?
【Leetcode】200. 岛屿数量(中等)
【微信小程序】组件使用及属性参考
factorial factorization
【PCL学习笔记】点云处理常用的库和API(PCL库+Eigen)
[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
Tess4J 图片文字识别
中小型金融企业该如何进行灾备建设?
LinkedList 5-141. 环形链表
路由ISIS
稳步向前不忘初心,沃尔沃的安全感来自公众的认可
HMS Core Discovery第16期回顾|与虎墩一起,玩转AI新“声”态
CRM如何帮助企业营销获客
[网络]路由BGP
阶乘因式分解
一文参透分布式存储系统Ceph的架构设计、集群搭建(手把手)
MLX90640 红外热成像仪开发笔记(九)
This article penetrates the architecture design and cluster construction of the distributed storage system Ceph (hands-on)
ASCII code sorting