题解 1010: [编程入门]利润计算 摘要:解题思路: 分段判断注意事项: 计算时不用百分数表述;参考代码:#include<stdio.h>int main(){ int profit; //利润 dou…… 题解列表 2022年01月24日 0 点赞 0 评论 208 浏览 评分:0.0
分段函数利润问题 摘要:解题思路:该题其实是一个分段函数,只需对其分类讨论,列出每个阶段利润所对应的函数,再进行计算即可注意事项:无论在数字与字母之间还是字母与字母之间,“ *“不可省略参考代码:#include<stdi…… 题解列表 2022年01月22日 0 点赞 0 评论 417 浏览 评分:6.0
1010: [编程入门]利润计算(python解) 摘要:解题思路:简单的分支语句 注意事项:计算需谨慎认真参考代码:while True: a=int(input()) if(a<=100000): x=a*0.1 elif…… 题解列表 2022年01月22日 0 点赞 2 评论 768 浏览 评分:6.0
c语言方法解决,一个个条件都放在if里判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int profit; int bonus; scanf("%d",&profit); if…… 题解列表 2022年01月21日 0 点赞 0 评论 204 浏览 评分:0.0
妙用递归简化问题 摘要:解题思路:递归的思路,为了简化大量重复的代码注意事项:无参考代码:#include<stdio.h> int f(int n){ if(n<=100000) return n*0.1; el…… 题解列表 2022年01月18日 0 点赞 1 评论 309 浏览 评分:9.9
利润计算(c代码) 摘要:解题思路:该题类似于分段函数,考虑用switch语句注意事项:一般思路就是用case语句从0--9加上default顺次编写,但要注意题目中的利润区间,在switch语句体现出来例如case 2:同时…… 题解列表 2022年01月09日 0 点赞 0 评论 682 浏览 评分:9.9
Java利润计算 摘要:解题思路:注意事项:零的个数不要搞混参考代码:import java.util.Scanner;public class Work1010 { public static void main(Stri…… 题解列表 2022年01月06日 0 点赞 0 评论 537 浏览 评分:9.9
利用笨办法求解 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int a; int b; while (cin >> a) { …… 题解列表 2021年12月29日 0 点赞 0 评论 205 浏览 评分:0.0
C++解题思路 摘要:解题思路: 注意事项: 参考代码: #include<cstdio> #include<iostream> using namespace std; int main() { …… 题解列表 2021年12月09日 0 点赞 0 评论 629 浏览 评分:0.0
【递归解决】利润计算 摘要:解题思路:递归调用注意事项:有点硬参考代码:int f(int a)//递归调用{ if(a<=100000) return a*0.1; else if(a>100000 && a<…… 题解列表 2021年11月30日 0 点赞 0 评论 350 浏览 评分:0.0