Question: I can't figure out why I am getting negative values for y in the output. Wrong output Correct output import java.util.Scanner public class Test public

I can't figure out why I am getting negative values for y in the output.

I can't figure out why I am getting negative values for y

in the output. Wrong output Correct output import java.util.Scanner public class Test

Wrong output

public static void main (String[] args) Scanner keyboard new Scanner(System.in); // this

Correct output

scanner is to prompt the user to input the integers necessary for

import java.util.Scanner public class Test public static void main (String[] args) Scanner keyboard new Scanner(System.in); // this scanner is to prompt the user to input the integers necessary for the print lines of x //variables int xValue, starCount[ String star"; int [] starAmount; String [l starPoint; // this is being declared for the actual stars in for the graph output double increment, minimum // these doubles are accounting for the user input for the array values String pointOfStar.[; System.out.println("Please enter the number of x values to process"; xValue = keyboard.nextInt(); System.out.println("Enter a minimum value for x:" minimumkeyboard.nextDoubleO; System.out.println("Enter the amount to increment") increment- keyboard.nextDoub le); // following is code for for if x value is below one and will print out an error message if (xValue

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!