Re: Can someone determine the output of this?

Discussion in 'Java' started by Lars Enderin, Feb 3, 2014.

  1. Lars Enderin

    Lars Enderin Guest

    2014-02-03 06:02, securitygates skrev:
    > public class Weather
    > {
    > public static void main(String [] arguments)
    > {
    > float fah=86;
    > System.out.println(fah + "degrees Farenheit is...");
    > // To convert Farenheit into Celsius
    > // Begin by subtracting 32
    > fah = fah-32;
    > // Divide the answer by 9
    > fah = fah/9;
    > // Multiply that answer by 5
    > fah = fah*5;
    > System.out.println(fah + "degrees Celsius\n");
    >
    > float cel=33;
    > System.out.println(cel + "degrees Celsius is...");
    > // To convert Farenheit into Celsius
    > // Begin by subtracting 32
    > cel = cel*9;
    > // Divide the answer by 9
    > cel = cel/5;
    > // Multiply that answer by 5
    > cel=cel+32;
    > System.out.println(cel + "degrees Farenheit");
    > }
    > }


    I can see that you are extremely sloppy, re-using the comments from the
    first part without a thought. Your signature sucks, too.

    --
    Lars Enderin
    Lars Enderin, Feb 3, 2014
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Aarti
    Replies:
    3
    Views:
    276
  2. Peña, Botp
    Replies:
    1
    Views:
    229
    Robert Klemme
    Jan 24, 2004
  3. Replies:
    0
    Views:
    91
  4. Roedy Green
    Replies:
    0
    Views:
    97
    Roedy Green
    Feb 3, 2014
  5. Lew
    Replies:
    0
    Views:
    106
Loading...

Share This Page