C/C++入门
题单介绍
# C/C++~~不完全~~入门
该基础部分为算法版图中的**语法基础**,想要深入学习算法的同学可以自行搜索练习。
难度以$\textcolor{Red}{入门}$为主


如果是第一次使用洛谷,请阅读[洛谷帮助中心](https://help.luogu.com.cn/manual/luogu/)
本题单只提供知识点框架,如果不会写,可以点击右边**查看题解**或者参考书本使用。
### 顺序结构
##### 1.1 输入/输出
[B2002 Hello,World! ](https://www.luogu.com.cn/problem/B2002)
[B2005 字符三角形 ](https://www.luogu.com.cn/problem/B2005)
[B2025 输出字符菱形 ](https://www.luogu.com.cn/problem/B2025)
[P1000 超级玛丽游戏 ](https://www.luogu.com.cn/problem/P1000)
#### 1.2 变量定义/简单运算
掌握$int , long long , float , double , char$等类型的变量以及**加减乘除以及取余**等基本运算
[P1001 A+B Problem ](https://www.luogu.com.cn/problem/P1001)
[B2001 入门测试题目](https://www.luogu.com.cn/problem/B2001)
[B2008 计算 (a+b)×c 的值 ](https://www.luogu.com.cn/problem/B2008)
[P5703 【深基2.例5】苹果采购 ](https://www.luogu.com.cn/problem/P5703)
[P5704 【深基2.例6】字母转换 ](https://www.luogu.com.cn/problem/P5704)
[P5705 【深基2.例7】数字反转 ](https://www.luogu.com.cn/problem/P5706)
[P5706 【深基2.例8】再分肥宅水 ](https://www.luogu.com.cn/problem/P5706)
[P5708 【深基2.习2】三角形面积 ](https://www.luogu.com.cn/problem/P5708)
[B2029 大象喝水 ](https://www.luogu.com.cn/problem/B2029)
[P1425 小鱼的游泳时间 ](https://www.luogu.com.cn/problem/P1425)
[P1421 小玉买文具 ](https://www.luogu.com.cn/problem/P1421)
[P3954 [NOIP2017 普及组] 成绩 ](https://www.luogu.com.cn/problem/P3954)
[P5707 【深基2.例12】上学迟到 ](https://www.luogu.com.cn/problem/P5707)
[更多题目](https://www.luogu.com.cn/training/100#problems)
### 分支结构
掌握**if...else if...else... 和switch**选择语以及基本逻辑运算 **&& , || , == , !=**
[B2035 判断数正负 ](https://www.luogu.com.cn/problem/B2035)
[B2036 输出绝对值 ](https://www.luogu.com.cn/problem/B2036)
[P5710 【深基3.例2】数的性质 ](https://www.luogu.com.cn/problem/P5710)
[P2433 【深基1-2】小学数学 N 合一 ](https://www.luogu.com.cn/problem/P2433)
[P5711 【深基3.例3】闰年判断 ](https://www.luogu.com.cn/problem/P5711)
[B3676 [语言月赛202211] Winner ](https://www.luogu.com.cn/problem/B3676)
[B2048 计算邮资](https://www.luogu.com.cn/problem/B2048)
[P1909 [NOIP2016 普及组] 买铅笔 ](https://www.luogu.com.cn/problem/P1909)
[更多题目](https://www.luogu.com.cn/training/101#problems)
### 循环结构
掌握 **for ,while ,do....while , while...do**等循环语句
[B2083 画矩形 ](https://www.luogu.com.cn/problem/B2083)
[B2071 余数相同问题](https://www.luogu.com.cn/problem/B2071)
[B2078 含 k 个 3 的数 ](https://www.luogu.com.cn/problem/B2078)
[更多题目](https://www.luogu.com.cn/training/102#problems)
### 数组
#### 4.2 一维数组
[P1428 小鱼比可爱 ](https://www.luogu.com.cn/problem/P1428)
[P1427 小鱼的数字游戏 ](https://www.luogu.com.cn/problem/P1427)
[P5727 【深基5.例3】冰雹猜想 ](https://www.luogu.com.cn/problem/P5727)
[P1319 压缩技术 ](https://www.luogu.com.cn/problem/P1319)
[P1320 压缩技术(续集版) ](https://www.luogu.com.cn/problem/P2615)
#### 4.2 二维数组
[B2105 矩阵乘法 ](https://www.luogu.com.cn/problem/B2105)
[P1830 轰炸III ](https://www.luogu.com.cn/problem/P1830)
[P2615 [NOIP2015 提高组] 神奇的幻方 ](https://www.luogu.com.cn/problem/P2615)
[ P1205 [USACO1.2] 方块转换 Transformations ](https://www.luogu.com.cn/problem/P1205)
[更多题目](https://www.luogu.com.cn/training/103#problems)
### 字符串
#### 5.1 字符
$C$ 字符串 **char**
$C++STL$ 封装类字符串 **string**
与$C$不同 ,**学会使用string会极大简化字符串操作**
详细请看[什么是string](https://blog.csdn.net/qq_42351880/article/details/90635883)
[P5733 【深基6.例1】自动修正 ](https://www.luogu.com.cn/problem/P5733)
[P1914 小书童——凯撒密码 ](https://www.luogu.com.cn/problem/P1914)
#### 5.1 字符串
[P1957 口算练习题 ](https://www.luogu.com.cn/problem/P1957)
[P1055 [NOIP2008 普及组] ISBN 号码 ](https://www.luogu.com.cn/problem/P1055)
[P1308 [NOIP2011 普及组] 统计单词数 ](https://www.luogu.com.cn/problem/P1308)
[P2010 [NOIP2016 普及组] 回文日期 ](https://www.luogu.com.cn/problem/P2010)
[P5587 打字练习 ](https://www.luogu.com.cn/problem/P5587)
[更多题目](https://www.luogu.com.cn/training/104#problems)
### 函数/结构体
#### 6.1 函数
了解函数的**参数,返回类型,参数的传递方式(形参/实参)**,此外,自行学习使用指针,引用等知识点,该部分例题不会详细训练指针的使用以及 $C++$ 的**对象特性**。
[P5735 【深基7.例1】距离函数 ](https://www.luogu.com.cn/problem/P5735)
[P5738 【深基7.例4】歌唱比赛 ](https://www.luogu.com.cn/problem/P5738)
#### 6.2 函数
[P5744 【深基7.习9】培训 ](https://www.luogu.com.cn/problem/P5744)
[P5740 【深基7.例9】最厉害的学生 ](https://www.luogu.com.cn/problem/P5740)
#### 6.3 递归
**递归 / 递推**对于新手来说是编程和算法入门的难点,对后续数据结构,算法分析有很大影响。
[递归是什么?!](https://blog.csdn.net/qq_32431299/article/details/113919039)
[P1028 [NOIP2001 普及组] 数的计算 ]( https://www.luogu.com.cn/problem/P1028)
[P5739 【深基7.例7】计算阶乘 ](https://www.luogu.com.cn/problem/P5739)
[更多题目](https://www.luogu.com.cn/training/105#problems)
**想学习更多知识?请关注我的**[题单列表](https://www.luogu.com.cn/blog/DogE114514/xun-lian-ti-dan)
**或者我的**[blog](https://www.luogu.com.cn/blog/DogE114514/#829157)