#include<stdio.h>
  int main(){
  char sentence[100];
  int len=0,j,wordlen=0;
  gets(sentence);
  while(sentence[len]) len++;
  for(j=len-1;j>=0;j--){
  if(sentence[j]>='a'&&sentence[j]<='z'||sentence[j]>='A'&&sentence[j]<='Z')
  {
  wordlen++;
  }
  else if(wordlen>0){
  printf("%*.*s",wordlen,wordlen,&sentence[j+1]);
  printf("%c",sentence[j]);
  wordlen=0;
  }
  else
  rintf("%c",sentence[j]);
  }
  if(wordlen>0)
  printf("%*.*s",wordlen,wordlen,sentence);
  return 0;

随机推荐

  1. 启用crontab

    1.登录到root用户. 2.在root下输入:crontab -e 3.可能会提示你: no crontab for root - using an empty one 然后会叫你“Select a ...

  2. PHP的curl查看header信息的功能(包括查看返回header和请求header)

    PHP的curl功能十分强大,简单点说,就是一个PHP实现浏览器的基础. 最常用的可能就是抓取远程数据或者向远程POST数据.但是在这个过程中,调试时,可能会有查看header的必要. 如下: ech ...

  3. linked-list-cycle (快慢指针判断是否有环)

    class Solution { public: bool hasCycle(ListNode *head) { if (head == NULL) return NULL; //空表 ListNod ...

  4. day12 Python列表

    list#类 列表概括 li = [1,2,13,["石振文",["19", 10],"庞麦郎"],"charon",& ...

  5. Mybatis集成(转)

    文章转自http://blog.csdn.net/l454822901/article/details/51829653 什么是Mybatis MyBatis 本是apache的一个开源项目iBati ...

  6. ubuntu (14.04) 卸载 gnome 系统桌面

    1.将ubuntu 的图形界面切到命令行界面. 2.卸掉 gnome-shell 的主程序 sudo apt-get remove gnome-shell 3.卸载 gnome sudo apt-ge ...

  7. <转>七种测试驱动模式

    本文转载自微信公众号:中国软件测试联盟 在进行软件测试时,我们都需要一个出发点,从哪里开始分析?测试设计是基于什么?简单说,就是什么驱动测试工作的进行? 基于对软件工程.产品质量和测试的理解,归纳出以 ...

  8. sql实时提交事务

    public void deleteByHbtlidAndDept(String class_id,String depart_id) { Session session = this.getHibe ...

  9. Redis详解(八)------ 主从复制

    前面介绍Redis,我们都在一台服务器上进行操作的,也就是说读和写以及备份操作都是在一台Redis服务器上进行的,那么随着项目访问量的增加,对Redis服务器的操作也越加频繁,虽然Redis读写速度都 ...

  10. python 知识

    def action_cancel_sale_order(self,cr,uid,ids,context=None): self.message_post(cr, uid, ids, body=u&q ...