3.2.2练习3.4/3.2.2练习3.5
来源:互联网 发布:印度历史知乎 编辑:程序博客网 时间:2024/05/17 09:26
3.4
#include<iostream>
#include<string>#include<cctype>
using namespace std;
void main()
{
cout << "Enter tow string" << endl;
string s1,s2;
cin >> s1 >> s2;
if (s1.size() == s2.size())
cout << "They are the same long" << endl;
else if (s1.size() < s2.size())
cout << s2 <<" is longer" << endl;
else cout << s1 <<" is longer" << endl;
cin.get();
cin.get();
}
3.5
#include<iostream>
#include<string>
#include<cctype>
using namespace std;
void main()
{
cout << "Enter strings" << endl;
string s1, s2;
cin >> s2;
while (cin >> s1)
s2 += s1;
cin.clear();
cout << s2 << endl;
cin.get();
}
输入 crtl +Z+回车
阅读全文
0 0
- 3.2.2练习3.4/3.2.2练习3.5
- [练习]:LCA练习2
- 第三章 3.1节练习 & 3.2.2节练习
- 练习3.2,3.3,3.4
- 练习3.2
- 练习3.2
- 练习 3.2
- 练习2
- 练习2
- 练习2
- 练习2
- 练习2
- 【练习2】
- 练习2
- 练习2
- 练习2
- 练习2
- 练习2
- Caused by: org.xml.sax.SAXParseException; lineNumber: 33; columnNumber: 23; 元素类型为 "session-factory"
- 文章标题
- centos升级内核步骤
- 程序员如何利用空余时间挣零花钱?
- CSS-列表
- 3.2.2练习3.4/3.2.2练习3.5
- 添加水印工具类
- mysql以一张表的字段为条件查询另外一张表
- sql server学习笔记-day3
- java类集---集合工具类:Collections
- pom自动部署tomcat7插件
- Inter Edison平台GPIO操作及输出频率问题实测、CPU和MCU之间IPC通信机制(ttymcu)实测
- HTML angular追加内容,并进行判断原先是否存在和是否存在敏感字符
- GFIC 2017全球家庭互联网大会四大主题峰会详介