当前位置:网站首页>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]);
}
边栏推荐
- MongoDB索引
- JS get DPI, PX to cm, cm to PX
- 7-10 calculate salary
- SSH访问控制,多次失败登录即封掉IP,防止暴力破解
- 6-9 statistics of single digits (15 points)
- Solve the problem of dormitory router campus network sharing login
- Exercise 10-8 recursive implementation of sequential output of integers
- Common mixins
- Vite project commissioning
- GRPC的四种数据流以及案例
猜你喜欢
[email "/>Doxorubicin loaded on metal organic framework MIL-88 DOX | folic acid modified uio-66-nh2 doxorubicin loaded [email

7-15 calculation of PI

QT learning 20 standard dialog box in QT (middle)

JS Part III

7-11 calculation of residential water charges by sections

Exercise 9-3 plane vector addition

28: Chapter 3: develop Passport Service: 11: define attributes in the configuration file, and then obtain them in the code;

Metal organic framework MOFs loaded with non steroidal anti-inflammatory drugs | zif-8 wrapped Prussian blue loaded quercetin (preparation method)

Exercise 10-8 recursive implementation of sequential output of integers

常见问题之PHP——ldap_add(): Add: Undefined attribute type in
随机推荐
天图投资冲刺港股:资产管理规模249亿 投了小红书与奈雪
7-16 find the set of integers that meet the given conditions
1px problem of mobile terminal
7-7 12-24 hour system
Exercise 10-6 recursively find Fabonacci sequence
JS new challenges
fpga阻塞赋值和非阻塞赋值
[Jilin University] information sharing of postgraduate entrance examination and re examination
Example analysis of QT learning 18 login dialog box
7-20 print 99 formula table (format output)
Leetcode(4)——尋找兩個正序數組的中比特數
Too many files with unapproved license
allegro,orcad, net alias,port,off-page connector之间的异同点和如何选取
Exercise 8-7 string sorting
7-11 calculation of residential water charges by sections
Article content typesetting and code highlighting
Invalid Z-index problem
Exercise 10-1 calculate the sum of 1 to n using recursive functions
Raft agreement
7-9 find a small ball with a balance