编程入门]宏定义练习之三角形面积 摘要:解题思路:根据题目给出的数学公式,定义两个带参的宏,一个S表示(a+b+c)/2,另一个AREA表示sqrt(S*(S-a)*(S-b)*(S-c))。在主函数中可以直用printf("%.3f",A…… 题解列表 2022年06月14日 0 点赞 2 评论 595 浏览 评分:7.0
编写题解 1003: [编程入门]密码破译 摘要:解题思路:注意事项:参考代码:a = ['C', 'h', 'i', 'n', 'a']c = []for i in a…… 题解列表 2022年06月16日 0 点赞 0 评论 721 浏览 评分:7.0
1151: C语言训练-计算一个整数N的阶乘 摘要:解题思路:输入一个数,然后累乘。注意事项:注意用unsigned long long!参考代码:#include<iostream> using namespace std; int main()…… 题解列表 2022年06月18日 0 点赞 0 评论 694 浏览 评分:7.0
可以用下递归 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long f(int n){ if(n==1||n==0) return 1; el…… 题解列表 2022年07月17日 0 点赞 0 评论 624 浏览 评分:7.0
题解 1169: 绝对值排序 摘要:#include<stdio.h> #include<math.h> int main() { int i,j,t,n; while(scanf("%d",&n)!=EO…… 题解列表 2022年07月18日 0 点赞 0 评论 676 浏览 评分:7.0
1008: [编程入门]成绩评定(Python代码) ####**解题思路:**1.**输入**百分制成绩2.**判断**成绩等级**if-elif-elif-elif-else**3.**输出**等级####**注意事项:**无####**参考代码:**```pythona=eval(input())ifa>=90:print('A')elifapri 题解列表 2022年07月22日 0 点赞 0 评论 936 浏览 评分:7.0
第一个HelloWorld程序(Python代码) 解题思路:直接使用3个print语句注意事项:1、Python语言的每个语句后面不需要跟分号;2、输入多个相同符号可直接采用解法二的方法,输入符号后直接在后面跟*n(n为符号个数)。参考代码:解法一:print("**************************")print("HelloWorl 题解列表 2022年07月25日 0 点赞 2 评论 1181 浏览 评分:7.0
数列极差(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int cmp(int a,int b){ retur…… 题解列表 2022年08月04日 0 点赞 0 评论 1129 浏览 评分:7.0
编写题解 1033: [编程入门]自定义函数之字符提取(pythonj的简单题解!) 摘要:解题思路:运用列表的方法可以轻易的解决,加上两个循环注意事项:要了解每个函数的原理并熟练运用、、、、参考代码:ls=[] //定义一个空列表for i in range(3): …… 题解列表 2022年08月05日 0 点赞 0 评论 575 浏览 评分:7.0
paul: C语言数组后移--较易理解版本 摘要:#include const int N; int back(int a[],int b[],int m); int main(){ int i,m; scanf("%d"…… 题解列表 2022年09月05日 0 点赞 0 评论 488 浏览 评分:7.0