200字
2026-09-16 课堂任务与课后作业
2026-09-15
2026-09-15

程序运行网站:

https://www.jyshare.com/compile/10/

课堂任务/课后作业:

1、阅读教材/课讲,整理笔记,弄懂当日不懂知识点;

2、

You are developing a geometry calculator and need to calculate the area and circumference of a circle. Your task is to practice common methods of the Math class. Write a Java program named CircleCalculator that completes the following tasks in the main method:

Step 1:

Create a double variable radius with the value 5.0;

Create a double variable pi with the value Math.PI.

Step 2:

Use the formula: Area = π × radius² Hint:

Use Math.pow() to calculate the square of the radius .

Step 3: Use the formula: Circumference = 2 × π × radius

Step 4: Round the results to the nearest integer, then output them in the following format:

请提交代码截图至问卷星https://v.wjx.cn/vm/wtIoBOc.aspx#

2026-09-16 课堂任务与课后作业
作者
Administrator
发表于
2026-09-15
License
CC BY-NC-SA 4.0

评论