1159: 零起点学算法66——反话连篇
生活随笔
收集整理的這篇文章主要介紹了
1159: 零起点学算法66——反话连篇
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1159: 零起點學算法66——反話連篇
Time Limit: 1 Sec??Memory Limit: 64 MB?? 64bit IO Format: %lldSubmitted: 1470??Accepted: 626
[Submit][Status][Web Board]
Description
把輸入的字符按照反著順序輸出
?
Input
多組測試數據?
每組一行(每組數據不超過200個字符)
?
Output
按照輸入的順序反著輸出各個字符
?
Sample Input
I am a boy.?
Sample Output
.yob a ma I?
Source
零起點學算法
1 #include<stdio.h> 2 #include<string.h> 3 int main(){ 4 char ch[200]; 5 while(gets(ch)!=NULL){ 6 int n; 7 n=strlen(ch); 8 for(int i=n-1;i>=0;i--){ 9 printf("%c",ch[i]); 10 } 11 printf("\n"); 12 } 13 return 0; 14 }//對字符串的處理,很重要!!
轉載于:https://www.cnblogs.com/dddddd/p/6685369.html
總結
以上是生活随笔為你收集整理的1159: 零起点学算法66——反话连篇的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: mbed试玩—高速开发MCU应用(基于F
- 下一篇: openstack内存占用清理