题解列表

筛选

筛选N以内的素数c++代码实现

#筛选N以内的素数c++代码实现###解题思路**素数是什么?是除了1和本身之外,没有其他任何因数的数,所以我们只需要系一个程序,判断它是否有除1和本身之外的因数即可**###代码实现```cpp#includeusingnamespacestd;intmain(){inta,

老哥们点评点评

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>typedef struct s{    int id;    int grade;    stru……

1083: Hello, world!

摘要:```cpp #include using namespace std; int main() { int a; while(cin>>a) cout……

三个数字排大小,忙人解法^-^。

摘要:解题思路:多次使用if   else嵌套来判断三个数的大小。注意事项:无。参考代码:#include<stdio.h>int main(){    int a,b,c,max,min,zh;    s……

应该最简单了吧

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    int a,b;    char str[100],str2[100]……

两次递归,Sn,An

摘要:解题思路:注意事项:参考代码:#include<stdio.h> //求An的值 void An(int n, int i) { if (n==1) { printf("sin(%……