经典 if--else 语句解决 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int x; cin >> x; if(x < 1)…… 题解列表 2023年12月21日 1 点赞 0 评论 166 浏览 评分:0.0
分段函数求解 摘要:解题思路:注意事项:input使用int()强制转换参考代码:while True: try: x = int(input()) if(x<1): …… 题解列表 2024年02月16日 0 点赞 0 评论 367 浏览 评分:0.0
求分段函数的解 摘要:注意事项:1<=x<10的问题,好多新手都这样写,这在c里面是比较低级的错误,应该这样写 1<=x&&x<1参考代码:#include<stdio.h>int main(){ int x,y…… 题解列表 2024年03月14日 0 点赞 0 评论 381 浏览 评分:0.0
成绩评定用if的方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x; scanf("%d",&x); if(x>=90) printf("A\n"); else if…… 题解列表 2024年03月18日 0 点赞 0 评论 399 浏览 评分:0.0
对于这个问题,直接用暴力算法,直接求解 摘要:参考代码:#include<stdio.h>int main(){ int x; int y=0; scanf("%d",&x); if(x<1){ y=x; } if((x<10&&x>1)||x…… 题解列表 2024年08月04日 0 点赞 0 评论 421 浏览 评分:0.0
编写题解 1007: [编程入门]分段函数求值 摘要:解题思路:if语句确定x的取值范围,计算输出y。注意事项:注意x的取值范围。参考代码:#include<stdio.h> int main(){ int x,y; scanf("%d…… 题解列表 2024年09月14日 2 点赞 0 评论 896 浏览 评分:0.0
C++简单解法 摘要:解题思路:属于基础题目注意事项:参考代码:一般做法#include<iostream>using namespace std;int main(void…… 题解列表 2025年03月04日 0 点赞 0 评论 660 浏览 评分:0.0