2021年8月5日
摘要:
1 //函数重载 2 #include <iostream> 3 using namespace std; 4 //可以让函数名相同 提高复用性 5 6 //函数重载满足条件 7 //1.同一个作用域下 8 //2.函数名相同 9 //3.函数参数类型不同,个数,顺序不同 10 11 //注意: 函
阅读全文
posted @ 2021-08-05 09:58
Bytezero!
阅读(53)
推荐(0)
2021年8月4日
摘要:
1 /** 2 * ProjectNmae:通讯录管理系统 3 * 功能: 4 * 添加联系人:向通讯录添加新人 5 * 显示联系人:显示通讯录中的所有联系人信息 6 * 删除联系人:按照姓名进行删除指定联系人 7 * 查找联系人:按照姓名查看指定联系人信息 8 * 修改联系人:按照姓名重新修改指定
阅读全文
posted @ 2021-08-04 16:41
Bytezero!
阅读(1281)
推荐(0)
摘要:
1 //结构体案例 2 2 #include<iostream> 3 #include<string> 4 #include<ctime> 5 using namespace std; 6 7 struct Hero 8 { 9 string name; 10 int age; 11 string
阅读全文
posted @ 2021-08-04 11:12
Bytezero!
阅读(225)
推荐(0)
摘要:
1 //结构体案列 2 3 #include<iostream> 4 #include<string> 5 #include<ctime> 6 using namespace std; 7 8 //学生的结构体 9 struct Student 10 { 11 string sName; 12 in
阅读全文
posted @ 2021-08-04 09:50
Bytezero!
阅读(234)
推荐(0)
2021年8月2日
摘要:
1 //嵌套循环 乘法口诀 2 #include <iostream> 3 using namespace std; 4 int main() 5 { 6 int i ,j; 7 for ( i = 1; i <= 9; i++) 8 { 9 for (j = 1; j <= i; j++) 10
阅读全文
posted @ 2021-08-02 14:44
Bytezero!
阅读(228)
推荐(0)
摘要:
1 // 1-100之间 7的倍数 带7 打印 敲桌子 2 #include <iostream> 3 using namespace std; 4 5 int main() 6 { 7 for (int i = 1; i <= 100; i++) 8 { 9 if(i % 7==0 || i %
阅读全文
posted @ 2021-08-02 13:59
Bytezero!
阅读(430)
推荐(0)
摘要:
1 #include <iostream> 2 #include <ctime> 3 using namespace std; 4 5 int main() 6 { 7 int num = 100; 8 do 9 { 10 int a = 0; 11 int b = 0; 12 int c = 0;
阅读全文
posted @ 2021-08-02 11:11
Bytezero!
阅读(132)
推荐(0)
2021年7月30日
摘要:
1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 /* 5 *模拟实现道具店购物功能(商店暂时只支持一种类型的商品) 6 *商品具备名称,价格,库存等属性 7 *模拟玩家购买游戏道具 8 *1.玩家选择要购买的道具
阅读全文
posted @ 2021-07-30 12:45
Bytezero!
阅读(169)
推荐(0)
2021年7月28日
摘要:
C语言: C 语言是一种通用的高级语言,最初是由丹尼斯·里奇在贝尔实验室为开发 UNIX 操作系统而设计的。C 语言最开始是于 1972 年在 DEC PDP-11 计算机上被首次实现。 在 1978 年,布莱恩·柯林汉(Brian Kernighan)和丹尼斯·里奇(Dennis Ritchie)
阅读全文
posted @ 2021-07-28 12:35
Bytezero!
阅读(185)
推荐(0)
摘要:
第一个程序:1 //打印 hello world 2 3 #include <stdio.h> 4 int main() 5 { 6 printf("hello world!\n"); 7 return 0; 8 } 打印结果:
阅读全文
posted @ 2021-07-28 12:34
Bytezero!
阅读(92)
推荐(0)