posts - 137,comments - 0,views - 40818

随笔分类 -  C++基础第一卷

上一页 1 2 3 4 5
C++ 把二进制数转换为十进制数
摘要:#include <iostream> #include <windows.h> #include <string> using namespace std; int main() { string str; int p = 1; int s = 0; cout << "请输入一个二进制数:"; c 阅读全文
posted @ 2022-08-11 12:00 wshidaboss 阅读(1139) 评论(0) 推荐(0) 编辑
C++用短除法把十进制转换为二进制输出
摘要:#include <iostream> #include <Windows.h> #include <string> using namespace std; int main() { int n; int ret[32]; int i = 0; cout << "请输入一个正整数:"; cin > 阅读全文
posted @ 2022-08-08 20:50 wshidaboss 阅读(183) 评论(0) 推荐(0) 编辑
输入行数,用C++打印倒三角星号
摘要:#include <iostream> #include <Windows.h> #include <string> using namespace std; int main() { int row; cout << "请输入倒三角的行数:"; cin >> row; for (int i = 1 阅读全文
posted @ 2022-08-08 19:26 wshidaboss 阅读(720) 评论(0) 推荐(0) 编辑
输入行数,用C++打印金字塔型星号
摘要:#include <iostream> #include <windows.h> #include <string> using namespace std; int main() { int row; cout << "请输入行数:"; cin >> row; for (int i = 1; i 阅读全文
posted @ 2022-08-08 19:17 wshidaboss 阅读(519) 评论(0) 推荐(0) 编辑
用C++打印乘法口诀表(VS2019)
摘要:#include <iostream> #include <windows.h> #include <string>#include <iomanip> using namespace std; int main() { int width; for (int i = 1; i < 10; i++) 阅读全文
posted @ 2022-08-08 19:11 wshidaboss 阅读(136) 评论(0) 推荐(0) 编辑
用C++输出所有的水仙花数
摘要:#include <iostream> #include <windows.h> #include <string> using namespace std; int main(void) { int a, b, c; for (int i = 100; i <= 999; i++) { a = i 阅读全文
posted @ 2022-08-08 19:00 wshidaboss 阅读(109) 评论(0) 推荐(0) 编辑
用C++输出指定项的斐波那契数列
摘要:#include <iostream> #include <string> #include <windows.h> using namespace std; int main() { int n; long long s; long long a = 1; long long b = 1; whi 阅读全文
posted @ 2022-08-08 18:52 wshidaboss 阅读(89) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示