C语言-九九乘法表 解题思路:两次for循环,这里用到了另一个知识点C语言中的%2d是printf()函数的输出格式。表示将数字按宽度为2,采用右对齐方式输出,若数据位数不到2位,则左边补空格。相反,负则表示左对齐。注意事项:参考代码:#includeintmain(){inti, 题解列表 2021年12月13日 0 点赞 0 评论 638 浏览 评分:0.0
c语言巧妙解答 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[40]; int i,n; while(~s…… 题解列表 2021年12月13日 0 点赞 0 评论 615 浏览 评分:0.0
1017: [编程入门]完数的判断——不用指针数组。 摘要:解题思路:先判断是否是完数,当是完数时再考虑计算和输出因子。但感觉比较麻烦,不够减简洁。注意事项:参考代码:#include<stdio.h>int isPerfectNumber(int numbe…… 题解列表 2021年12月13日 0 点赞 0 评论 597 浏览 评分:0.0
1068: 二级C语言-温度转换 摘要:直接循环打印。#include<bits/stdc++.h> using namespace std; int main(){ int C; double F; …… 题解列表 2021年12月13日 0 点赞 0 评论 636 浏览 评分:0.0
1069: 二级C语言-寻找矩阵最值 摘要:#include<bits/stdc++.h> using namespace std; int main(){ int n,x; cin >> n; int …… 题解列表 2021年12月13日 0 点赞 0 评论 680 浏览 评分:0.0
1070: 二级C语言-成绩归类 摘要:#include<bits/stdc++.h> using namespace std; int main(){ vector<int> students; int x;…… 题解列表 2021年12月13日 0 点赞 0 评论 768 浏览 评分:0.0
1065: 二级C语言-最小绝对值 摘要:#include<bits/stdc++.h> using namespace std; int main(){ vector<int> a(10,0),b(10,0); …… 题解列表 2021年12月13日 0 点赞 0 评论 717 浏览 评分:0.0
有序数组插入新数据的处理-C语言 解题思路:1.一个有序数组中随机插入一个数字并能按升序输出新数组;2.那就要建立一个数组,长度为10(因为增加一个元素后数组长度+1,从原来的9变成10),先用for循环输入前9个数据(也可以用gets()函数直接输入),在最后输入要插入的数据;3.要将新数据插入到准确的位置, 题解列表 2021年12月14日 0 点赞 0 评论 872 浏览 评分:0.0
编写题解 1484: 蓝桥杯算法提高VIP-Quadratic Equation 解题思路:注意事项:参考代码:importmatha,b,c=map(float,input().split())x1=math.sqrt((-c/a)+(b/(a*2))**2)-b/(a*2)x2=-math.sqrt((-c/a)+(b/(a*2))**2)-b/(a*2)ifx1 题解列表 2021年12月14日 0 点赞 0 评论 744 浏览 评分:0.0 编写题解 1065: 二级C语言-最小绝对值 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a[10]; for…… 题解列表 2021年12月14日 0 点赞 0 评论 614 浏览 评分:0.0 « 12...1831183218331834183518361837...59235924 »
编写题解 1065: 二级C语言-最小绝对值 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a[10]; for…… 题解列表 2021年12月14日 0 点赞 0 评论 614 浏览 评分:0.0