当前位置:网站首页>String reverse order
String reverse order
2022-07-03 14:15:00 【Study hard 867】
Enter a string , Reverse the order of the string , Output the string in reverse order .
Input format :
The input gives no more than 80 In characters 、 Non empty string ending with carriage return .
Output format :
Output the string in reverse order on one line .
sample input :
Hello World!
sample output :
!dlroW olleHCode :
#include <stdio.h>
int main(){
char a[80];
int i;
for(i=0;(a[i]=getchar())!='\n';i++);
i=i-1;
for(i;i>0;i--)printf("%c",a[i]);
printf("%c",a[0]);
}
边栏推荐
- JS download files through URL links
- QT learning 19 standard dialog box in QT (top)
- JS input number and standard digit number are compared. The problem of adding 0 to 0
- Exercise 10-3 recursive implementation of exponential functions
- 全局事件总线
- Redis:字符串类型数据的操作命令
- 战略、战术(和 OKR)
- 全文检索引擎Solr系列—–全文检索基本原理
- JVM class loading
- 八大排序
猜你喜欢
随机推荐
MongoDB数据库入门的常用命令
JS continues to explore...
关于回溯问题中的排列问题的思考(LeetCode46题与47题)
Canvas utility library fabric JS user manual
消息订阅与发布
Concat and concat_ Ws() differences and groups_ Use of concat() and repeat() functions
Vite project commissioning
愉悦资本新双币基金近40亿元完成首次关账
常见问题之PHP——ldap_add(): Add: Undefined attribute type in
天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪
Solution to failure or slow downloading of electron when electron uses electron builder to package
全文检索引擎Solr系列—–全文检索基本原理
JVM garbage collector
556. 下一个更大元素 III
x86汇编语言-从实模式到保护模式 笔记
concat和concat_ws()区别及group_concat()和repeat()函数的使用
[clean up the extraordinary image of Disk C]
Redis:字符串類型數據的操作命令
js . Find the first palindrome string in the array
Reflection -- basic usage









