UVa:490 - Rotating Sentences
来源:互联网 发布:智能数据分析系统 编辑:程序博客网 时间:2024/05/17 23:26
刚开始接触这道题时,并不知道如何结束输入,苦恼了好一阵,做HDU的hat‘s word时师兄给了提示之后才明白,“Ctrl+Z+回车” 是在这种情况下结束输入的。这道题还需注意的是:在某个句子输出完后,如果还要输出,则需在没有字符的位置用空格代替。就因为没注意到这一点,WA了好几次。
#include<stdio.h>#include<string.h>char se[110][110];int main(){ int k=0,maxl,len; while(gets(se[k])!=NULL){ if(k==0) maxl=strlen(se[k]); else{ len=strlen(se[k]); if(maxl<len) maxl=len; } k++; } for(int i=0;i<maxl;++i){ for(int j=k-1;j>=0;--j){ if(i<strlen(se[j])) printf("%c",se[j][i]); else printf(" "); } printf("\n"); } return 0;}
- Uva 490 Rotating Sentences
- UVa 490 - Rotating Sentences
- UVA-490-Rotating Sentences
- UVa 490 - Rotating Sentences
- UVA 490 - Rotating Sentences
- UVa 490 - Rotating Sentences
- UVa:490 - Rotating Sentences
- UVA 490 Rotating Sentences
- UVA:490 - Rotating Sentences
- UVA - 490 - Rotating Sentences
- UVa 490 - Rotating Sentences
- UVa 490 - Rotating Sentences
- UVa 490 Rotating sentences
- UVA - 490 Rotating Sentences
- UVA 490 Rotating Sentences
- UVA - 490 Rotating Sentences
- UVa 490 - Rotating Sentences
- UVA 490 Rotating Sentences
- 录音 - 静音检测(转)
- Hibernate进行单向Many-to-Many映射时如果只删除一方及中间表,切忌莫加入Cascade
- 程序中提醒用户进去App Store 评分 跳转 代码
- sqlserver,oracle,mysql等的driver驱动,url怎么写
- android 读取doc文档
- UVa:490 - Rotating Sentences
- 如何测试CTS4.1
- CentOS 卸载OpenJdk
- Android 网络连接--Wifi/3G
- 敏捷外包工程之七:报价管理(功能点)
- GDI编程
- 利用 JTA 处理事务机制与原理
- EDIT控件自动滚动最后行
- Tomcat7下java.lang.IllegalArgumentException: Document base问题处理