题解列表

筛选

第1049题,巧妙利用Switch不加break

摘要:解题思路:注意事项:闰年:能被四整除同时不被100整除,或能被400整除year%4==0&&year%100||year%400==0参考代码:#include<stdio.h>struct dat……

选择排序,很简单的

摘要:解题思路:每次比较,想方法把大的往后排就ok;注意事项:注意流程和范围,别忘记比较;参考代码:#include<stdio.h>int main(){ int a[10],t; for(int i=0……

输入输出练习之浮点数专题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){  double f;  scanf("%lf",&f);  printf("%f\n",f);  printf(……

蓝桥杯算法提高- c++_ch02_02

摘要:解题思路:简单用switch结构注意事项:要注意scanf后面空格,否则计算不出结果参考代码#include<stdio.h>int main(){  int a,b;  char c;  scanf……

阶乘求和(C语言)

摘要:解题思路:注意事项:数值超出int范围(-32768~32767),需要用更大范围的类型参考代码:#include<stdio.h>int main(){    int n, i, k=1; long……