#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0

    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򉼱 - 3.88
    h. (5 - 615)/(73-46-11)

    All arithmetic calculations are to be done by the program not you.

    (I assume the sign means multiply)

    Appreciate all your help guys
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,926
    Rep Power
    1045
    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.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2013
    Posts
    2
    Rep Power
    0
    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.

    Comments on this post

    • tvc3mye disagrees : If you are completely clueless, then start from scratch: Go through tutorials found in google, start by typing the keyword "Java Tutorial beginner"
  6. #4
  7. Contributing User
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Aug 2010
    Location
    Eastern Florida
    Posts
    3,696
    Rep Power
    347
    java program that prints the values
    Start by defining a class with the main() method.
    Add a call to the println() method to print out the number.

    See the tutorial for how to get started:
    http://docs.oracle.com/javase/tutori...ava/win32.html
  8. #5
  9. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,926
    Rep Power
    1045
    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.

    Comments on this post

    • pol212 disagrees

IMN logo majestic logo threadwatch logo seochat tools logo