Discuss Homework Help Arithmetic Expressions in the Java Help forum on Dev Shed. Homework Help Arithmetic Expressions Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics.
Posts: 2
Time spent in forums: 1 h 43 m 36 sec
Reputation Power: 0
Homework - Homework Help Arithmetic Expressions
Write, code, and test a java program that prints the values of the following arithmetic expressions:
a. 2013
b. 3819.06
c. 7252 + 816
d. 4496 - 342
e, 751 - 5259
f. 8377.99 + 2.2406
g. 193 -7·6·5 - 3.88
h. (5³ - 6·15)/(7·3-4·6-11)
All arithmetic calculations are to be done by the program not you.
Posts: 2,043
Time spent in forums: 1 Month 3 Weeks 3 h 7 m 4 sec
Reputation Power: 812
Hi,
and what are we supposed to do now? In other words, what's your question? I mean, I assume you do know how to write the number "2013" in a Java program and output it.
Posts: 2
Time spent in forums: 1 h 43 m 36 sec
Reputation Power: 0
Quote:
Originally Posted by Jacques1
Hi,
and what are we supposed to do now? In other words, what's your question? I mean, I assume you do know how to write the number "2013" in a Java program and output it.
Im actually completely clueless as to how to code this.
Posts: 2,043
Time spent in forums: 1 Month 3 Weeks 3 h 7 m 4 sec
Reputation Power: 812
Quote:
Originally Posted by pol212
Im actually completely clueless as to how to code this.
No offense, but then you should start listening more carefully when at school (or wherever you got that from) and learn to use Google.
If you got a concrete question or stumbled upon a specific problem (like strange results for the division), that's perfectly fine. But saying that you have absolutely no idea what to do is a bit ... weak in the times of Youtube tutorials everywhere.
There is nothing to "code". The first part is simply a "Hallo world" with numbers. All you need is a general understanding of how Java code looks like and how it is compiled. You should be able to find that out within, say, half an hour.
Like I said: If you got a concrete question or a problem (like an unexpected result or an error message), we'll gladly help you. But don't expect us to do the thinking for you or hand out code. This is your homework, after all.