do while 2
来源:互联网 发布:软件系统分析师 编辑:程序博客网 时间:2024/05/29 10:37
#include <iostream>#include <string>using namespace std;int main (){ string rsp;do{cout << "Please enter two values: ";int i, j;cin >> i >> j;cout << "The sum of " << i << " + " << j << " = " << i + j << "\n\n" << "More? [Yes][no]";cin >> rsp;}while(!rsp.empty() && rsp[0] != 'n'); string k1,k2,k3;do{cout << "Enter two strings: " << endl ;cin >> k1 >> k2;if(k1 < k2) cout << "The first string is smaller than the second one." << endl;else if(k1 == k2)cout << "Two strings are equals. " << endl;elsecout << "The second string is smaller than the first one. ";cout << "Continue? (y-yes, n-no)" << endl;cin >> k3;}while(k3[0] != 'n' && k3[0] != 'N'); return 0;}
0 0
- do while 2
- do-while
- do while
- do while
- do while
- do while
- do while
- do while
- do while
- do while
- do while
- do while
- while ; do
- do-while
- do while
- do while
- do while
- do while
- Calabash
- O2O 一比一积分兑换项目 源码实现和框架搭建
- MySqlCommand查询条件中包含中文没有结果的问题
- 常用的相似性度量(距离总结)
- java对mysql的操作
- do while 2
- uva12124
- Java Collections.synchronizedMap方法分析
- 空间向量坐标运算
- UITableView的属性
- Usb Audio Device Descriptor(8) Type I Format Type Descriptor
- Codeforces Round #339 (Div. 2) A. Link/Cut Tree - Codeforces(思维)
- mac 命令大全
- c++ 纯虚函数