自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 C++ primer 5th 练习6.5

#include <iostream>using namespace std;int fact(int i){ int a = 0; a = ((i >=0) ? i : i * -1); return a;} int main(){ int i = 0, a = 0; cout << "please enter a num" << endl; cin >> i; a = fact(i); cout << a.

2021-06-17 14:35:28 64

原创 C++ primer 5th 练习5.21

#include <iostream>using namespace std;int main(){ string str1, tempstr; unsigned cnt = 0; cin >> str1; tempstr = str1; while (cin >> str1) { if (str1 == tempstr && isupper(str1[0])) //isupper在网上查的 好像有别的办法来着 忘了 { .

2021-06-16 16:51:07 84

C++ primer 5th 练习5.20

#include <iostream>using namespace std;int main(){ string str1, tempstr; unsigned cnt = 0; cin >> str1; tempstr = str1; while (cin >> str1) { if (str1 == tempstr) { cnt = 1; break; } else { tempstr = str1; .

2021-06-16 16:33:21 120

原创 C++ primer 5th 练习5.19

#include<iostream>using namespace std;int main(){ string str1, str2, str3; cout << "qwq" << endl; cin >> str1 >> str2; str3 = (str1.size() > str2.size() ? str1 : str2); cout << str3 << endl; sys.

2021-06-13 21:29:33 101 1

原创 C++ primer 5th 练习5.17

#include <iostream>#include<vector>using namespace std;int main(){ vector<int> ivec1 = { 0,1,1,3 }; vector<int> ivec2 = { 0,1,1,2,3,5,8 }; int i = 0; int z = 1; cout << ivec1.size() << endl << ivec2.siz.

2021-06-13 21:05:11 126

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除