自定义函数分离字符 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include <math.h>#include <string.h>fen(char a[4…… 题解列表 2021年12月19日 0 点赞 0 评论 583 浏览 评分:0.0
1060: 二级C语言-同因查找 解题思路:将10-1000之间的数循环再将循环的数对2,3,7取余输出注意事项:参考代码:publicclassMain{publicstaticvoidmain(String[]args){for(inti=10;i<=1000;i++){if(i%2==0&&i%3==0&&i%7==0){Sys 题解列表 2021年12月19日 0 点赞 0 评论 1029 浏览 评分:0.0
1026: [编程入门]数字逆序输出 解题思路:创建一个10个长度的整型数组,在控制台输入10个数,再用for循环将数组的最后一位当首位依次输出注意事项:控制台输入的数不要超出数组长度参考代码:Scannerin=newScanner(System.in);inta[]=newint[10];for(inti=0;i<10;i++){a[ 题解列表 2021年12月19日 0 点赞 0 评论 697 浏览 评分:0.0
1970: 巨大的数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,a[n],j=1; cin>>n; …… 题解列表 2021年12月19日 0 点赞 0 评论 674 浏览 评分:0.0
1979: 求平均工资 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,a[n],he=0; cin>>n;…… 题解列表 2021年12月19日 0 点赞 0 评论 652 浏览 评分:0.0
1027: [编程入门]自定义函数处理最大公约数与最小公倍数 摘要:参考代码:#includeint fun1(int a,int b){ int yue=1,j=a,k=b; if(j>k){ j=b,k=a; } for(in…… 题解列表 2021年12月19日 0 点赞 0 评论 651 浏览 评分:0.0
1676: 数据结构-链表的基本操作 摘要:错了两次才过,这题有一个数据很大的样例,输入输出不能用 cin 和 cout,字符串用 char 数组不要用 string,不然会时间超限。#include<bits/stdc++.h> using…… 题解列表 2021年12月19日 0 点赞 0 评论 633 浏览 评分:0.0
1052: [编程入门]链表合并 摘要:这里的解法是依次将结点插入链表。题目的本意应该是提供 a 和 b 两个现成的链表,然后将 b 链表归并到 a 链表里,最后将链表排序。#include<bits/stdc++.h> using na…… 题解列表 2021年12月19日 0 点赞 0 评论 1008 浏览 评分:0.0
1028: [编程入门]自定义函数求一元二次方程 摘要:解题思路:令一元二次方程判别式: b2 - 4ac为变量P当P > 0时:x1 = (-b+sqrt(P)) / 2ax1 = (-b-sqrt(P)) / 2a当P = 0时:x1 = x2 = -…… 题解列表 2021年12月19日 0 点赞 0 评论 707 浏览 评分:0.0
求圆的面积(c++) 摘要:解题思路:注意事项:控制浮点数精度参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ double r; c…… 题解列表 2021年12月20日 0 点赞 0 评论 670 浏览 评分:0.0