单位转换计划 [英] Units conversion program

查看:79
本文介绍了单位转换计划的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1。该程序需要将btu转换为jules

2.将卡路里转换为焦耳

3.将焦耳转换为焦耳

4退出程序。

如果用户键入1-4以外的任何内容,程序应该打印错误信息。


这是我的代码。

展开 | 选择 | Wrap | 行号

解决方案

你的问题是什么?


你当然知道你只是检查选项1(并且不要求java ==)



你有什么问题?



我开始编写将btu转换为焦耳的代码。此代码对我不起作用


1. the program needs to convert btu to jules
2. Convert calories to joules
3. Convert joules to joules
4 exit the program.
if the user type anything other than 1-4 the program should print a error message.

here is my code.

Expand|Select|Wrap|Line Numbers

解决方案

what is your problem?


You do, of course realise that you only ever check for option 1 (and doesn''t java require ==)


what is your problem?

I started writing the code to convert btu to joules. This code is not working for me


这篇关于单位转换计划的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆