2021年3月全国计算机等级考试真题(二级C语言) 考试笔记 摘要:在c程序的函数中不能定义另一个函数文件指针是程序中用FILE定义的指针变量结构化程序设计原则***描述算法***判断语句()中 ==才是判断是否相等 =是赋值 会报错数据能共享且独立性高逻辑表达式的值…… 文章列表 2023年09月22日 0 点赞 0 评论 244 浏览 评分:2.0
笔记(关于递归的) 摘要:题目:不用循环,递归升序输出1-100 参考代码: ```c #include int print(int a) { if(a…… 文章列表 2023年09月20日 0 点赞 0 评论 135 浏览 评分:0.0
笔记(关于九九乘法表的没试过的写法) 摘要:先写个正常的九九乘法表,给大伙洗洗眼,后面的写法,都不算正常的,第一种可以改,第二种似乎改不了 ```c #include int main() { for(int i=1;i9) …… 文章列表 2023年09月18日 0 点赞 0 评论 160 浏览 评分:0.0
一种利用switch_case特性的巧妙解法 摘要:# 一种利用switch_case特性的巧妙解法——减少代码量 ## 原题提供 企业发放的奖金根据利润I提成。 利润I低于或等于100000元的,奖金可提10%; 利润高于100000元,…… 文章列表 2023年09月17日 0 点赞 0 评论 201 浏览 评分:9.9
冒泡排序代码 摘要:#include <bits/stdc++.h> using namespace std; typedef long long ll ; ll a[1000] ; int main() { …… 文章列表 2023年09月09日 0 点赞 0 评论 200 浏览 评分:9.9
[编程入门]结构体之时间设计-题解(C语言代码) 摘要:解题思路:1、定义结构体,并定义结构体变量2、注意闰年问题:将其定义为if(y % 4 == 0 && y % 100 != 0 || y % 400 == 0)其中y为year的缩写。3、定义一个数…… 文章列表 2023年09月08日 0 点赞 0 评论 150 浏览 评分:9.9
数组模拟阶乘计算 摘要:```cpp #include using namespace std; const int N = 1e4+10; int ans[N]; int main() { int n; c…… 文章列表 2023年09月04日 0 点赞 0 评论 210 浏览 评分:0.0
前六章复习赛题目E 摘要:#include <bits/stdc++.h> using namespace std; int main() { int a,sum=0; cin>>a; for(i…… 文章列表 2023年09月02日 0 点赞 0 评论 111 浏览 评分:9.9
保留两位小数(备忘)(常用) 摘要:##四舍五入到小数点后两位 float sum=round(sum*100)/100; 10.523——10.52 ##舍入到小数点后两位 float sum=floor(sum…… 文章列表 2023年08月24日 0 点赞 0 评论 217 浏览 评分:9.9