题解列表

筛选

c语言计算素数和

摘要:解题思路:判断素数,相加所有素数。注意事项:参考代码:#include<stdio.h>#include<math.h>int isprime(int x);int main(){ int m,n; ……

自定义函数之整数处理 C++题解

摘要:解题思路输入数组每个元素后,找出最大值和最小值的下标,交换第一位和最小值,最后一位和最大值C++中min_element(a+n,a+m)和max_element(a+n,a+m)可以找出数组中最小值……

水仙花数判断

摘要:解题思路:        1.求水仙花数的关键是对个位上的数、十位上的数和百位上的数的寻找            1.1求个位上的数可以直接该数字对10取余。即为个位上的数           

c语言求解大小写问题

摘要:解题思路:求出2,22,222...就好办了。注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i,a,n; long long t……

C语言-分段函数

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

数字的处理与判断

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