Question

java program: to solve as many linear equations as possible. using while loop, and 5 linear...

java program: to solve as many linear equations as possible. using while loop, and 5 linear equations
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:-

The below is the required source code for the given problem

Code:-

%%class definition
public class LinearEquation {
%%main method definition
    public static void main(String[] args) {
%%variables
        int x,y;
%%intiallization
        x=0;
%%printing the header
        System.out.println("X\tY");
%%finding the value of y based on x
        while(x<10){
%%calculating y value
            y=2*x+1;
%%showing the value
            System.out.println(x+"\t"+y);
%%incrementing the value of x
            x++;
        }
    }
}

If you find difficulty to understand the code, please let me know in comments tab below, Then I will provide another code or else i will any modifications in the present code. Hope it will helps you. Please give Thumbs Up!! Thank you for posting the question, All the best.

Add a comment
Know the answer?
Add Answer to:
java program: to solve as many linear equations as possible. using while loop, and 5 linear...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please write a java program that inputs positive numbers using a while loop until a negative...

    Please write a java program that inputs positive numbers using a while loop until a negative number is input and finds the sum of the numbers input

  • For this lab you will write a Java program using a loop that will play a...

    For this lab you will write a Java program using a loop that will play a simple Guess The Number game. Th gener e program will randomly loop where it prompt the user for a ate an integer between 1 and 200 (including both 1 and 200 as possible choices) and will enter a r has guessed the correct number, the program will end with a message indicating how many guesses it took to get the right answer and a...

  • FINAL (Continued 7. (12% ) Solve, if possible, the following system of linear equations using Cramer's...

    FINAL (Continued 7. (12% ) Solve, if possible, the following system of linear equations using Cramer's Rule 3z1 + -zs 7 +2r+3 3 2,+6 =-4 8. (15% ) Determine the characteristic polynomial, eigenvalues, and the corresponding eigenspaces. -2 Diagonalize (if poesible) the matrix A= Give the similarity transformation. -3 0 2 9 (15% ) Orthogonally diagonalize the symmetric matrix A Give the similarity transformation. FINAL (Continued 7. (12% ) Solve, if possible, the following system of linear equations using Cramer's...

  • Using java use a while loop use JOptionPane Scenario – You go to an arcade with...

    Using java use a while loop use JOptionPane Scenario – You go to an arcade with 100 tokens, and each game costs a variable number of tokens. Before the loop begins, display how many tokens you have available. Inside the loop, ask the user how many tokens does the next game cost, and subtract that amount from the total tokens if it is less than or equal to the total tokens. Then, state how many tokens are still left.

  • HELP IN JAVA: WHILE LOOP: Write a program that asks the user to enter a number...

    HELP IN JAVA: WHILE LOOP: Write a program that asks the user to enter a number of seconds. This number should be less than or equal to 32767 because that is the largest number pep8 can handle. Your program should then output the number of hours, minutes, and seconds on the planet of Crypton, where there are 64 seconds in a minute and 32 minutes in an hour.

  • 5. Solve the linear program below as follows: First, solve the dual problem graphically. Then use...

    Operations Research 5. Solve the linear program below as follows: First, solve the dual problem graphically. Then use the solution to the dual problem to determine which variables in the primal problem are zero in the optimal primal solution. [Hint: Invoke complementary slackness.] Finally, solve for the optimal basic variables in the primal, using the primal equations. Primal Maximize-4x2 + 3x3 2x4-8xs, subject to: 3x1 + x2 + 2x3 +x4 = 3. x)2。 (j=1,2,3, 4.5). 5. Solve the linear program...

  • Use Cramer's Rule to solve (if possible) the system of linear equations. (If not possible, enter...

    Use Cramer's Rule to solve (if possible) the system of linear equations. (If not possible, enter IMPOSSIBLE.) 4x - 2y + 3z = -11 2x + 2y + 5z = 1 8x - 5y – 2z = 10 (x, y, z) = (I

  • Question 7 Java provides four repetition structures (for loop, while loop, do while, and goto loop)...

    Question 7 Java provides four repetition structures (for loop, while loop, do while, and goto loop) True False Question 7 Java provides four repetition structures (for loop, while loop, do while, and goto loop) True False

  • java program QUESTION 2: 1. Write a do-while loop that asks the user to select a...

    java program QUESTION 2: 1. Write a do-while loop that asks the user to select a task from the following menu to continue: 1. Option 1 2. Option 2 3. Option 3 4. Option 4 5. Exit Read the selection from the keyboard then write the switch statement: For option 1, display the message "Do the option 1" For option 2, display the message "Do the option 2" For option 3, display the message "Do the option 3" For option...

  • Write a C++ program. Using the while loop or the do – while loop write a...

    Write a C++ program. Using the while loop or the do – while loop write a program that does the following: Calculate the average of a series of homework grades (0 - 100) entered one at a time. In this case the lowest score will be dropped and the average computed with the remaining grades. For example suppose you enter the following grades: 78, 85, 81, 90, 88, 93 and 97.The average will be computed from the 6 grades 85,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT