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 5 of 5

Thread: i need help writing a code for a math problem

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Post i need help writing a code for a math problem

    Create a class called Assignment2c which will calculate and print the value of y for the below equation. X will be input by the user.


    2x^2 - 3x

    y = ______________________
    x + 2

    • Please run your program four times with different values input from the user for X. In the first two instances let X=5 and X=7, and you choose values for X for the next two. (Note: When X=5, the value for Y should be 5. When X=7, Y=8.555555.
    • Please save the results from your output screen (with all 4 runs) in a file.


  2. #2
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    My Mood
    Mellow
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: i need help writing a code for a math problem

    So what exactly is your problem? No one here will do your homework for you..

  3. #3
    Junior Member
    Join Date
    Feb 2013
    Posts
    2
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: i need help writing a code for a math problem

    im a beginner in programming and i need help with writing a java code for this math problem.


    import java.util.Scanner;

    public class Assignment2c {

    public static void generate() {

  4. #4
    Junior Member
    Join Date
    Jan 2013
    Posts
    5
    My Mood
    Mellow
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default Re: i need help writing a code for a math problem

    that's not good enough. Google how to use math

  5. The Following User Says Thank You to megusta For This Useful Post:

    djjava (February 6th, 2013)

  6. #5
    Super Moderator curmudgeon's Avatar
    Join Date
    Aug 2012
    Posts
    1,130
    My Mood
    Cynical
    Thanks
    64
    Thanked 140 Times in 135 Posts

    Default Re: i need help writing a code for a math problem

    You need to go through some tutorials as no one is going to do this work for you. We can help answer specific questions, so at least try, then come back with your code and your questions if it doesn't work.

  7. The Following User Says Thank You to curmudgeon For This Useful Post:

    djjava (February 6th, 2013)

Similar Threads

  1. I am having trouble writing code that solves this problem involving check sums.
    By uncoordinated in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 21st, 2013, 08:30 PM
  2. Help With Putting This Math Problem Into Code
    By Pettsa in forum Object Oriented Programming
    Replies: 23
    Last Post: May 28th, 2012, 06:48 PM
  3. Math program problem.
    By dylanka in forum What's Wrong With My Code?
    Replies: 3
    Last Post: October 27th, 2011, 03:44 PM
  4. Math Problem
    By kidsforsale in forum What's Wrong With My Code?
    Replies: 11
    Last Post: September 14th, 2010, 04:09 PM
  5. switch and math problem issues
    By emartino in forum Java Theory & Questions
    Replies: 1
    Last Post: January 19th, 2010, 05:34 PM

Tags for this Thread