题解列表
1038: [编程入门]宏定义练习之三角形面积
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)/2#define AREA(a,b,c) sqrt(s……
简单计算,解方程法,设a[1]为x
摘要:#include<iostream>#include<iomanip>using namespace std;class myitem{public: double item_x; double it……
[编程入门]成绩评定 题解
摘要:解题思路:直接用if语句编写就可以。注意if的括号后不要加;。输入X的前面要加上&。参考代码:#include <stdio.h>int main(){ int x; scanf("%d", &x);……
2774: 计算三角形面积
摘要:解题思路:注意事项:参考代码:import mathx1,y1,x2,y2,x3,y3 = map(float,input().strip().split())a = math.sqrt((x1 - ……
2775: 等差数列末项计算
摘要:解题思路:注意事项:参考代码:a , b , n = map(int,input().strip().split())print(a + (n - 1) * (b - a)) #等差数列公式: an ……
用switch开关语句解决分段问题
摘要:解题思路:采用switch开关语句,使代码更为简洁注意事项:参考代码:#include<stdio.h>#include<stdlib.h>int main(){ int x,y,i; scanf("……
C语言 自定义函数之数字后移&
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define Long 30 //Long为数组最大长度int main(){ void move_nu……