当前位置:网站首页>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;
}
边栏推荐
- Kubernetes 的 5 个误区
- 虚拟偶像的歌声原来是这样生成的!
- Go语言结构体Go range怎么使用
- 参与造谣传谣,华为宣布开除五名员工
- 58 security - image quality assessment technology practice
- 掘金量化:通过history方法获取数据,和新浪财经,雪球同用等比复权因子。不同于同花顺
- LinkedList 5-141. The circular linked list
- Tutorial/detailed_workflow. Ipynb quantitative financial Qlib library
- query词权重, 搜索词权重计算
- Groeb - "gramm, explicit and complete n -" gramm mask language model, implements the explicit n - "gramm semantic unit modeling knowledge.
猜你喜欢

稳步向前不忘初心,沃尔沃的安全感来自公众的认可

factorial factorization

pycaret在钻石数据集上的使用 - 回归问题

面试官:小伙子你来说说MySQL底层架构设计

贪心(1)区间完全覆盖问题

Flutter dynamic | Fair server new version features

澜舟孟子轻量化预训练模型技术实践

RocketQA: across batches negative sampling (cross - batch negatives), the denoising of strong negative cases of sampling (denoised hard negative from) and data to enhance (data augment

Practice of Weibo Advertising Operation and Maintenance Technology Supporting Ten Billions of Requests

ByteArrayOutputStream 类源码分析
随机推荐
如何写好设计文档
【高并发】我用多线程进一步优化了亿级流量电商业务下的海量数据校对系统,性能再次提升了200%!!(全程干货,建议收藏)
一键搭建博客:如何使用WordPress插件搭建专属博客
Groeb - "gramm, explicit and complete n -" gramm mask language model, implements the explicit n - "gramm semantic unit modeling knowledge.
PHP使用PDO连接sql server
[网络]路由路由策略
Sorting and searching binary search method
flutter如何实现切换页面缓存
递归法解决N皇后问题
Chicken and rabbit in the same cage
STC8h1k28六个基本实验
LinkedList 5-141. The circular linked list
再见Postman!一款更适合国人的接口管理工具
节省70%的显存,训练速度提高2倍!浙大&阿里提出在线卷积重新参数化OREPA,代码已开源!(CVPR 2022 )...
Twin all things digital visual | join the real world and the digital space
[C language brush questions] Explanation of the use of linked lists
应用程序间的数据传输TCP协议的特点及
【Swoole系列3.2】Swoole 异步进程服务系统
Moving forward steadily without forgetting the original intention, Volvo's sense of security comes from the public's recognition
【 Leetcode 】 200. The number of islands (medium)