当前位置:网站首页>第四局 匹配 上 数据分析
第四局 匹配 上 数据分析
2022-07-21 05:05:00 【小手冰凉a】
/*今讲一下判断语句,生活中也常遇到(腾讯防沉迷系统)
1.第一种 if(如果) else if(或者) else(否则)
举一个例子 如果你好好学习,就输入一个1,校招拿个好的offer,走向人生巅峰;或者你是不是要继承家业,请输入2;否则毕业等于失业,回家开荒垦土
*/
//#include<stdio.h>
//int main()
//{
// int volunteer = 0;//定义
// scanf_s("%d", &volunteer);//微软认为scanf加个_s(safety)这样是安全的
// if (volunteer == 1)//在C中一个=为赋值;a==b两个表示a是否等于b if(条件)
// {
// printf("offer到手,人生巅峰指日可待\n");
// }
// else if (volunteer == 2) {//else if(条件)
// printf("家里有矿,不好意思\n");
// }
// else {
// printf("害,三亩田地,自力更生吧\n");
// }
// return 0;
//}//if();else if(); else后面一定要加{};就相当于,你拿这皇帝玉玺{}管三军六将;没拿只能管自己家的(下面一行)
//if也可以嵌套使用 比如你首先成年然后成绩超过90分才可以打游戏;否则,赶紧回家学习去,不然你家长拿着棍子开始挥霍了
//#include<stdio.h>
//int main()
//{
// int age = 0;
// int score = 0;
// scanf_s("%d %d", &age, &score);
// if (age >= 18) {
// if (score >= 90) {
// printf("上号上号速度速度,车队发车\n");
// }
// else {
// printf("抱歉,成绩有点小偏差,好好学习");
// }
// }
// else {
// printf("抱歉您还未成年\n");
//
// }
// return 0;
//}
/*----------------------------
2.switch语句 举例子:有一道选择题,选出正能量的一项
*/
#include<stdio.h>
int main() {
int lol = 0;
scanf_s("%d", &lol);
switch (lol) {//你把switch就相当于一个选择题题目
case 1://case就是选项
printf("黑虎掏心\n");
break;//break就是打破,你选完了就不要纠结这道题了
case 2:
printf("倒打一耙\n");
break;
case 3:
printf("浩然正气");
break;
default://default(默认),你前面三个选项都不选,我就默认为你放弃本题
printf("你想干啥??\n");
break;
}
return 0;
}
边栏推荐
- Mmdetection environment matching (cuda10.1+mmdet2.24)
- C. Binary String(求前缀和)
- 《C语言》2022山西专升本C语言知识点
- boost::this_thread::sleep (boost::posix_time::microseconds (100000))报错“this_thread”:“::”左侧的符号必须是一种类型
- 深度剖析 string —— strchr & strstr
- D. Insert a Progression(数学)
- 深度学习源码项目里的checkpoint
- Yum install GCC error
- M-ary to n-ary
- Stm32f407-ov7670 (no FIFO) -onenet- upload camera pictures to onenet (EDP protocol)
猜你喜欢
Adjacency table of graph and its depth first (DFS) and breadth first (BFS) traversal
Tensorflow GPU environment configuration
Checkpoint in the deep learning source code project
P1364 医院设置
UNET reproduction and environment configuration (including dataset)
Stm32f407-ov7670 (no FIFO) -onenet- upload camera pictures to onenet (EDP protocol)
(环境配置)TDD-net
Pytorch installation
pycharm专业版创建flask项目|下载flask包|以及一些例子
做题引发对getchar()的理解
随机推荐
Adjacency table of graph and its depth first (DFS) and breadth first (BFS) traversal
深度剖析 string —— memcpy & memmove
Training and acquisition of Chinese wiki corpus
[PCB] 3.7V lithium battery -- 5V charge / discharge control circuit -- ip5306 -- drawing board notes
让代码解决《线性代数》系列 - 求多项式的最大公因式
Self attention principle
bert从入门到实践笔记本
Pytorch installation
The output coordinates of the target detection task are decimal
小游戏类项目 —— 五子棋游戏
1012数字分类
《C语言》2022山西专升本C语言知识点
1023组最小数
OneNote plug-in, cloud expansion
matlab2021a配置gpu遇到错误error C1083: 无法打开包括文件: “gpu/mxGPUArray.h”: No such file or directory
PointNet++S3DIS数据集训练报错记录
UNET reproduction and environment configuration (including dataset)
Hetai ht32 & taojingchi tjc--t0 serial port screen learning notes
scanf 详解 - 你所不知道的scanf用法
1009说反话