c代码记录之字符串前n行原样输出,后面的以空格回车分割输出 摘要: #include int main() { int n; char str[1001]; scanf("%d",&n)…… 题解列表 2023年11月30日 0 点赞 0 评论 319 浏览 评分:0.0
数字统计(有注释) 摘要:解题思路:这段代码的主要功能是统计从0到用户输入的整数n中,每个数字的个位数字出现的次数。它使用一个包含10个元素的整数数组a来记录每个数字出现的次数,然后在循环中逐个迭代从0到n的数字,将其个位数字…… 题解列表 2023年11月30日 0 点赞 0 评论 579 浏览 评分:9.9
题解 2772: 苹果和虫子 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double n,x,y; cin>>n>>x…… 题解列表 2023年11月30日 0 点赞 0 评论 295 浏览 评分:4.7
自定义函数处理素数——C语言;调用函数;易懂; 摘要:解题思路: 素数是除1和它本身之外没有它能除尽的数,所以使用循环与选择结构解题;注意事项: 一定注意不能在循环中使用if判断素数,否则会出现一串字母;所以定义一个新变量作为记录是否有数能被你…… 题解列表 2023年11月30日 0 点赞 0 评论 361 浏览 评分:6.0
c++编写字符串分类统计 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(void){ int num=0,space=0,word=0,other=…… 题解列表 2023年11月30日 0 点赞 0 评论 351 浏览 评分:0.0
利用C++来编写求和训练 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h> using namespace std;int a,b,c;int sumOfa(int a);lo…… 题解列表 2023年11月30日 0 点赞 0 评论 260 浏览 评分:0.0
利用C++输出1000以内的所有水仙花数 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h>using namespace std;int judgement(int num);int main…… 题解列表 2023年11月30日 0 点赞 0 评论 267 浏览 评分:0.0
c代码记录之验证字串 摘要:1.空串是所有字符串的子串,但这题好像不验证这个 2.gets不通过,scanf能通过 #include #include int main() { …… 题解列表 2023年11月30日 0 点赞 1 评论 378 浏览 评分:2.0
简单的写一下 摘要:解题思路:注意事项:参考代码: import java.util.Scanner; public class Main { public static void main(String[] ar…… 题解列表 2023年11月30日 0 点赞 0 评论 397 浏览 评分:9.9
与圆相关的计算 摘要:解题思路:注意事项:使用#include<math.h>头文件里的pow n次方时编译会显示答案错误参考代码:#include<stdio.h>int main(){ double r; doubl…… 题解列表 2023年11月30日 0 点赞 0 评论 434 浏览 评分:0.0