- 5
- 0
- 约2.25千字
- 约 3页
- 2017-05-08 发布于四川
- 举报
云大JAVA实验2Lab#2[陆歌浩]
云南大学软件学院 实验报告
: 序号: 姓名: 成绩:
实验2 练习Java基本编程结构
一、实验目的
练习Java基本编程结构,包括注释、数据类型、变量、赋值、运算符号。
二、实验内容
Program 1
Write Java program called AverageNumbers.java to determine the average of several numbers. Set the following five integer variables: int1 = 5 int2 = 7 int3 = 4 int4 = 25 int5 = 13 Calculate and display the average of these numbers and the square root of average.
程序代码:
public class FarheheitToCentigrade {
public static void main (String[] args) {
double tempFarenheit = 98.6;
double Centigrade = (tempFarenheit-32)*5/9;
System.out.println(98.6华摄
您可能关注的文档
最近下载
- 维控人机界面初级教程.pdf
- 诺帝菲尔N-6000联动型控制器说明书.pdf
- 集美大学《嵌入式系统B》2023-2024学年第二学期期末试卷.doc VIP
- 全面解读安全生产“十条硬措施” 及落地执行要点+讲义.pptx VIP
- 肠系膜静脉血栓护理查房.pptx VIP
- 2023年云南省高考历史试题特点及备考建议 .pdf VIP
- 危重患者早期识别及处理.pptx
- 2026年公安机关人民警察基本级执法资格考试题库及答案全册.docx VIP
- 南京农业大学人文社科核心期刊目录(20258版).docx VIP
- 第13课《最后一次讲演》课件+2024—2025学年统编版语文八年级下册.pptx VIP
原创力文档

文档评论(0)