帮助java编程 [英] Help in java programming

查看:74
本文介绍了帮助java编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编写一个程序,提示用户他们正在旅行的速度(v)以及他们以该速度行进(To)的时间。 (在该等式中,变量c表示光速)。然后,打印出地球上已经过了多长时间。

为简单起见,提示用户时间(以年为单位),以及相对于光速的速度。 (这样,您不必担心单位)。



我尝试过:



我不知道从哪里开始或如何做这个程序

解决方案

我们不做你的功课:它是为一个原因。它就是为了让你思考你被告知的事情,并试着理解它。它也在那里,以便您的导师可以识别您身体虚弱的区域,并将更多的注意力集中在补救措施上。

所以请阅读您的课程笔记,查看以前的作业解决方案,并仔细研究问题 - 它非常清楚地说明了你要做什么。亲自尝试一下,你可能会发现它并不像你想象的那么困难!



如果你遇到一个具体的问题,那么请询问一下,我们会尽力而为帮助。但是我们不打算为你做这一切!


你知道,你只需要申请时间扩张 [ ^ ]公式输入变量。例如,请参阅:超越基本算术(Java™教程 - 学习Java语言 - 数字和字符串) [ ^ ]

Write a program that prompts the user for the velocity (v) they are traveling at and how long they have been traveling (To) at that speed. (In this equation, the variable c represents the speed of light). Then, print out how much time has elapsed on earth.
For simplicity, prompt the user for the time (in years), and for the speed relative to the speed of light. (This way, you don't have to worry about units).

What I have tried:

I do not know where to start or how to do this program

解决方案

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
So read your course notes, look at your previous homework solutions, and study the question carefully - it specifies pretty clearly exactly what you are to do. Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!


You know, you have just to apply time dilatation[^] formula to the input variables. See, for instance: Beyond Basic Arithmetic (The Java™ Tutorials - Learning the Java Language - Numbers and Strings)[^].


这篇关于帮助java编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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