Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Help with Math.sqrt()

  1. #1
    Member
    Join Date
    Sep 2013
    Posts
    36
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default Help with Math.sqrt()

    Hello,

    Here is the code I have put together. I don't understand why the math.sqrt won't multiply my variables Math.sqrt(numberFirst*numberSecond) but it will add them together and give me their square root.

     
    Last edited by Edmacelroy; October 9th, 2013 at 01:56 PM. Reason: can't delete

  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: Help with Math.sqrt()

    I don't understand why the math.sqrt won't multiply my variables
    Are you getting an error or something?
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

  3. #3
    Member
    Join Date
    Sep 2013
    Posts
    36
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Default Re: Help with Math.sqrt()

    No, it works I was trying to do something else with it. Thanks for the reply I was just about to remove it.

Similar Threads

  1. Sqrt Program, skips over method
    By Lashickk in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 21st, 2013, 01:06 PM
  2. [SOLVED] Help with Math.tan and Math.atan
    By Dr.Code in forum Algorithms & Recursion
    Replies: 6
    Last Post: July 2nd, 2012, 05:54 AM
  3. Math.sqrt causing general havoc
    By Garrett93 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 26th, 2012, 03:43 AM
  4. Confusion with Math.toDegrees() and Math.toRadians(). Please help.
    By marksquall in forum Java Theory & Questions
    Replies: 3
    Last Post: June 23rd, 2011, 01:28 AM