牛客网一站通Offer考试第一题
来源:互联网 发布:萨伏伊别墅尺寸数据 编辑:程序博客网 时间:2024/05/29 12:18
#include <iostream>#include <string>using namespace std;int main(){ string str="This is a sample"; int begin,end; int j=0; for(int i=0;i<16;i++) { if(str[i]>=65&&str[i]<=90&&str[i]!=' '){ str[i]+=32; continue; } if(str[i]>=97&&str[i]<=122&&str[i]!=' ') str[i]-=32; } reverse(str.begin(),str.end()); while(str[j]) { if(str[j]!=' ') { begin=j; while(str[j]!=' '&&str[j]) j++; j=j-1; end=j; } while(end>begin) { char temp; temp=str[begin]; str[begin]=str[end]; str[end]=temp; begin++; end--; } j++; } cout<<str<<endl; return 0;}
0 0
- 牛客网一站通Offer考试第一题
- 剑指offer第一题
- 剑指offer第一题
- 剑指Offer第一题
- 2005下半年高程考试 下午第一题
- 2005上半年高程考试 下午第一题
- 华为2016上机考试第一题
- C++等级考试第一套题遇到的问题
- 系统分析师今年考试第一题所属章节
- 第五届计算机职业资格认证考试CCF (第一题)
- 第二次考试 (图论)第一题 劣质的草
- 今天又是考试时间了,大家来考试了,第一题,答对有奖呀
- 第一个offer
- MCSE2003 第一门考试感受
- 剑指offer第一题【二维数组中的查找】c++实现
- 剑指offer第一题:二维数组中的查找解题报告
- 剑指Offer——银行考试
- 我的第一份offer
- 面向问题,而非面向对象
- 现代控制理论课件资料与说明
- andriod bluetooth gatt 详细讲解
- 即时刷新父窗体数据(调用父窗体的方法)
- 快速排序递归与非递归实现
- 牛客网一站通Offer考试第一题
- 每天一篇python:执行shell命令
- 细读百度地图点聚合源码(上)
- 设计模式学习--命令模式
- 学习排序 Learning to Rank 小结
- 二叉树递归、非递归求深度
- css3 之 border-sizing
- Sharepoint 轻量化应用之初试面谈表单制作!
- 欢迎使用CSDN-markdown编辑器