求球的体积 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ double r,v; while(scanf("%lf",&r)!=EOF) { …… 题解列表 2024年12月05日 3 点赞 0 评论 1138 浏览 评分:0.0
宏定义PI来进行体积输出 解题思路:球体体积等于Π*4/3*r*r*r,采用宏定义PI来简化运算注意事项:由于是不定项输入输出,所以要用while语句判断。这个代码在OJ网站是绝对可以通过的,但是本地IDE可能会出现格式不标准的问题,原因是本地IDE输出需要按回车键, 题解列表 2026年07月16日 1 点赞 0 评论 183 浏览 评分:0.0
题解 1173: 计算球体积 摘要:解题思路:运用while循环解答注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(St…… 题解列表 2023年04月13日 0 点赞 0 评论 572 浏览 评分:0.0
计算球的体积(Python) 摘要:解题思路:注意事项:使用while循环要加上异常处理块try:……except EOFError:参考代码:importmathwhil…… 题解列表 2025年10月13日 0 点赞 0 评论 483 浏览 评分:0.0
2025.7.16刷题记录 摘要:解题思路:通过while循环进行死循环持续输入 循环条件为scanf("%lf",&d)!=EOF注意事项:EOF为一个特殊常量表示的是 平时用到的ctrl+z…… 题解列表 2025年07月16日 0 点赞 0 评论 602 浏览 评分:0.0
计算球体积(C++代码) 摘要:参考代码:#include <iostream>#include <cmath> // 包含cmath头文件来使用pow函数和M_PI常量#include<iomanip>using namespa…… 题解列表 2023年07月12日 0 点赞 0 评论 949 浏览 评分:0.0
计算球体积 摘要:解题思路:注意事项:参考代码:import mathpi=math.pi //导入库while True: &n 题解列表 2024年12月21日 2 点赞 0 评论 975 浏览 评分:0.0
计算球体积,认识EOF 摘要:解题思路:注意事项:EOF是End Of File的意思,表示文件结束,无可读取参考代码:#include<stdio.h>#include<math.h>#define PI 3.14159int …… 题解列表 2023年11月30日 0 点赞 0 评论 604 浏览 评分:0.0
1173: 计算球体积 题解 摘要:```c #include #include int main() { double r, a = 0; while (scanf("%lf", &r) != EOF) …… 题解列表 2024年08月06日 0 点赞 0 评论 702 浏览 评分:0.0
1173 计算球的体积 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;#define PI 3.1415926int main(){ …… 题解列表 2024年07月08日 0 点赞 0 评论 548 浏览 评分:0.0