1054: 二级C语言-计算素数和 摘要:解题思路:调用了一个函数来判断是否为质数,是就返回该值,不是就返回0参考代码:#include <stdio.h> int isprime(int b){ int i,k=1; …… 题解列表 2021年08月19日 0 点赞 0 评论 500 浏览 评分:9.9
1053: 二级C语言-平均值计算 摘要:解题思路:很显然这道题要用到数组,来记录读入的十个数,对其求和/10,使用for循环比较大小输出就可以了参考代码:#include <stdio.h> int main(){ int x,i,k…… 题解列表 2021年08月19日 0 点赞 0 评论 470 浏览 评分:9.9
1111111111111111111111 摘要:解题思路:注意事项:参考代码#include "stdio.h"int main() { int n, m; while (scanf("%d%d", &n, &m)!=EOF) { int num…… 题解列表 2021年08月19日 0 点赞 0 评论 389 浏览 评分:0.0
1003: [编程入门]密码破译 摘要:解题思路:由China变成Glmre可知:原来的字母由它后面的第4个所代替。那么我们就可以声明五个变量,然后输入一下,把五个字符变量的ASCII码值+4,最后输出即可。(https://baike.b…… 题解列表 2021年08月19日 0 点赞 1 评论 3034 浏览 评分:8.0
编写题解 1206: 字符串问题(c++) 摘要:解题思路:相同的字符串进行逆转,用两个不同的变量i,j标记,i记录串尾位置,j记录串头位置,用个for循环就好参考代码: #include <iostream>#inclu…… 题解列表 2021年08月19日 0 点赞 0 评论 391 浏览 评分:0.0
1116: IP判断(C++代码) 摘要:#include <iostream> #include <string> using namespace std; //判断ip是否合法 bool isLegal(string i…… 题解列表 2021年08月19日 0 点赞 0 评论 272 浏览 评分:0.0
[编程入门]自定义函数之字符类型统计 AC代码 摘要:```cpp #include using namespace std; int get_letter_num(string s_1) { int j = 0; for (int i…… 题解列表 2021年08月18日 0 点赞 0 评论 519 浏览 评分:9.9
编写题解 1034: [编程入门]自定义函数之数字分离 AC代码 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ char letter; while (cin >> le…… 题解列表 2021年08月18日 0 点赞 0 评论 523 浏览 评分:9.9
计算一个整数N的阶乘 题解+函数+冷知识 摘要:解题思路:个人认为用数组做方便,写着方便a[i]=a[i-i]*icout<<a[n];注意事项:0!=1参考代码:献丑了~,本来想用递归的,结果内存超限失败了。亮代码!!!#include<bits…… 题解列表 2021年08月18日 0 点赞 1 评论 359 浏览 评分:6.5
简单快速的亲和数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m; while ((scanf("%d", &m)) != EOF ) { int x, y; f…… 题解列表 2021年08月18日 0 点赞 0 评论 262 浏览 评分:0.0