[编程入门]自定义函数求一元二次方程 摘要:解题思路:定义三个子函数,分别求取判别式(b^2-4*a*c)在>0(两个不同根),=0(两个相同根),<0(无实数根,输出虚数根)时的根,并输出就可以了注意事项:1.使用函数pow(x,n)和sqr…… 题解列表 2024年08月23日 0 点赞 0 评论 609 浏览 评分:0.0
编写题解 1028: [编程入门]自定义函数求一元二次方程 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>void fun(double a, double b, double c) { double…… 题解列表 2024年09月29日 0 点赞 0 评论 872 浏览 评分:0.0
Python方法求根 摘要:参考代码:from math import * a,b,c=map(int,input().split()) m=b**2-4*a*c if m>=0: n=sqrt(m) …… 题解列表 2024年12月26日 1 点赞 0 评论 853 浏览 评分:0.0
1028: [编程入门]自定义函数求一元二次方程 摘要:```c#include #include int main() { double a,b,c; scanf("%lf%lf%lf",&a,&b,&c); doubl…… 题解列表 2025年03月11日 0 点赞 0 评论 1259 浏览 评分:0.0
T1028 一元二次--7行解决,简洁明了 解题思路:注意事项:#我也是在前几个前辈的代码下,总结简化的,不要恶意对比参考代码:a,b,c=map(int,input().split())t=b**2-4*a*cx1=-b/(2*a)x2=t**0.5/(2*a)x3=(-t)**0.5/(2*a)ift>=0:print(x1+x2, 题解列表 2025年05月05日 2 点赞 1 评论 752 浏览 评分:0.0
菜鸟记录11111111111 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,c,t;&nb…… 题解列表 2025年05月08日 0 点赞 1 评论 729 浏览 评分:0.0
自定义函数求一元二次方程 解题思路:注意事项:参考代码:#include#includefloatx1,x2;voiddayu0(floata,floatb,floatc){x1=((-b)+sqrt(b*b-(4*a*c)))/(2*a);x2=((-b)-sqrt(b*b-(4*a*c)) 题解列表 2025年09月19日 0 点赞 0 评论 750 浏览 评分:0.0
T1028-自定义函数求一元二次方程--步骤清晰 摘要:解题思路:注意事项:参考代码:importmatha,b,c=map(float,input().split())d&n…… 题解列表 2025年11月04日 0 点赞 0 评论 518 浏览 评分:0.0
c语言,绝对值,分段函数求值 解题思路:注意事项:参考代码:#include#includeintmain(){floata,b,c,d,x1,x2,m,n;scanf("%f%f%f",&a,&b,&c);d=b*b-4*a*c;if(d>0){x1=(sqrt(d)-b)/(2*a);x2=( 题解列表 2025年12月20日 0 点赞 0 评论 433 浏览 评分:0.0
C语言+自定义函数求解一元二次方程 摘要:解题思路:注意事项:1. 一元二次方程一般形式:ax² + bx + c = 0(a不能等于0)2. 关键判别式:Δ = b² - 4ac(根的类型由它决定)&nb…… 题解列表 2025年12月22日 0 点赞 0 评论 861 浏览 评分:0.0