摘要: #include<iostream> using namespace std; int main() { //字符型 char ch = 'a'; cout << ch << endl; cout << "char字符型变量所占内存:" << sizeof(char)<<endl; system(" 阅读全文
posted @ 2020-02-24 12:14 Jackie_Wang 阅读(150) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; int main() { //2.单精度float //3.双精度double //默认情况下会输出6位有效数字 //科学计数法 float f1 = 3.14f; float f2 = 3e-2; cout << f1 阅读全文
posted @ 2020-02-24 11:59 Jackie_Wang 阅读(530) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; int main() { int a = 10; cout << "a=" << a << endl; system("pause"); return 0; } 阅读全文
posted @ 2020-02-24 10:39 Jackie_Wang 阅读(127) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std; int main(){ cout << "hello world!" << endl;//输出"hello world!" system("pause"); return 0; } 阅读全文
posted @ 2020-02-24 10:31 Jackie_Wang 阅读(394) 评论(0) 推荐(0) 编辑
摘要: 集合 a.特点:具有无序性,单一性,不可重复性 b.用法: b1.pop(随机删除) remove(删除不存在元素会报错) discard(删除不存在元素不会报错) 三者的区别 b2.集合关系的交、并、差、交叉补集集的运算 b3.字符串格式化 b4.format的用法 函数 阅读全文
posted @ 2019-01-07 11:41 Jackie_Wang 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 注意 elif 以及 pass(表示不执行任何操作) 用while实现循环。 a.while...else..... b.break、continue 3.运算符. bool值 :True(真)、False(假) 常见运算符:+、-、*、/、//、%、** 判断某个元素是不是在某个集合中:in 、n 阅读全文
posted @ 2018-12-31 14:10 Jackie_Wang 阅读(204) 评论(0) 推荐(0) 编辑