编写题解 2790: 分段函数if--else 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ float a,y; scanf("%f",&a); if(a<5){ y=-…… 题解列表 2023年07月04日 0 点赞 0 评论 590 浏览 评分:0.0
分段函数 -- 简单明了 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double n; scanf("%lf",&n); if(0<=n && n<5) / /注…… 题解列表 2023年02月20日 0 点赞 0 评论 514 浏览 评分:0.0
python版代码!!!! 摘要:解题思路:注意事项:参考代码:def f(x): if 0 <= x < 5: result = -x + 2.5 elif 5 <= x < 10: resu…… 题解列表 2024年02月03日 0 点赞 0 评论 677 浏览 评分:4.7
C语言 逻辑判断方法 学习模仿2789题解里一个有点意思的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main ( ){ float a ;&nbs…… 题解列表 2025年01月03日 0 点赞 0 评论 610 浏览 评分:6.0
编写题解 2790: 分段函数 摘要:解题思路:注意事项:用小数类型定义;改头文件参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x; c…… 题解列表 2024年01月07日 0 点赞 0 评论 442 浏览 评分:7.3
分段函数(c语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>double fun(double x){ if(x>=0 && x<5) { return -…… 题解列表 2023年01月14日 0 点赞 0 评论 626 浏览 评分:7.3
2790: 分段函数 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { doubl…… 题解列表 2023年11月07日 0 点赞 0 评论 644 浏览 评分:8.0
分段函数(分支法) 摘要:解题思路:就是简单的分支来控制这个函数注意事项:参考代码:#include<stdio.h>int main(){ float a; scanf("%f",&a); if(a>=0&…… 题解列表 2022年11月11日 0 点赞 0 评论 957 浏览 评分:9.7
2790: 分段函数(c++) 摘要:解题思路:注意事项:保留3位浮点小数参考代码:#include<bits/stdc++.h>using namespace std;int main(){ float x; cin>>x;…… 题解列表 2023年02月06日 0 点赞 0 评论 681 浏览 评分:9.9
编写题解 2790: 分段函数 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[] arg…… 题解列表 2023年12月07日 0 点赞 0 评论 502 浏览 评分:9.9