当前位置:网站首页>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]);
}
边栏推荐
- Leetcode (4) - - trouver la médiane de deux tableaux ordonnés positifs
- 可编程逻辑器件软件测试
- Duet date picker (time plug-in that can manually enter the date)
- JS new challenges
- 2021年区域赛ICPC沈阳站J-Luggage Lock(代码简洁)
- 别再问自己适不适合做软件测试了
- Exercise 10-1 calculate the sum of 1 to n using recursive functions
- allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
- Mysql多表查询 #子查询
- 7-14 sum integer segments (C language)
猜你喜欢

Why are grass-roots colleges and universities with "soil and poverty" called "Northeast small Tsinghua"?
![[clean up the extraordinary image of Disk C]](/img/0d/331115bc5d82d6337ae975a08494b2.jpg)
[clean up the extraordinary image of Disk C]

Page generation QR code

Nucleic acid modified metal organic framework drug carrier | pcn-223 metal organic framework encapsulated ad adamantane | zif-8 encapsulated adriamycin (DOX)

Redis: redis data structure and key operation commands

npm install卡住与node-npy的各种奇怪报错

allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取

7-18 finding the single root of polynomial by dichotomy

JS Part III

protobuf与grpc
随机推荐
消息订阅与发布
Simulated access
QT learning 25 layout manager (4)
Sendmail无法发送邮件及发送过慢解决
玖逸云黑免费无加密版本源码
The small project (servlet+jsp+mysql+el+jstl) completes a servlet with login function, with the operation of adding, deleting, modifying and querying. Realize login authentication, prevent illegal log
JS matrix zero
Duet date picker (time plug-in that can manually enter the date)
JVM object lifecycle
虽然不一定最优秀,但一定是最努力的!
剑指 Offer 28. 对称的二叉树
7-4 BCD decryption (10 points)
Redis:Redis的数据结构、key的操作命令
Exercise 10-1 calculate the sum of 1 to n using recursive functions
Exercise 10-3 recursive implementation of exponential functions
Raft 协议
JS continues to explore...
Thinking about the arrangement problem in the backtracking problem (leetcode questions 46 and 47)
Selenium browser (1)
Formation of mil-100 (FE) coated small molecule aspirin [email protected] (FE) | glycyrrhetinic acid modified metal organ