题解列表

筛选

三目运算符简化闰年

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define LEAP_YEAR(y) (y%4==0&&y%100!=0||y%400==0)?&#39;L&#39;:&#39;N……

宏定义三角简化

摘要:解题思路:宏定义函数求解注意事项:注意不要超出界限参考代码:#include<stdio.h>#include<math.h>#define a_1(a,b,c) (a+b+c)/2#define s……

彩票解题思路

摘要:解题思路:注意事项:参考代码:Scanner sc = new Scanner(System.in); int n = sc.nextInt(),cnt; int[] arr1 = new int……

宏定义与指针区别

摘要:解题思路:注意事项:参考代码:指针是访问 而宏定义是机械替换#include<stdio.h>#define swap(a,b){int temp;temp=a;a=b;b=temp}int main……

数列排序简单思路

摘要:解题思路:注意事项:参考代码:# include <iostream> using namespace std; int main() { int n; cin >> n; w……

2783: 判断是否为两位数

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int a;    scanf("%d",&a);    if(a>=10&&a<=99){       ……

1015: [编程入门]求和训练

摘要:解题思路:用递归写 怎么样注意事项:参考代码:#include<stdio.h>int main(){ float a,b,c; scanf("%f %f %f",&a,&b,&c); float f……