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.


Wrong output
![public static void main (String[] args) Scanner keyboard new Scanner(System.in); // this](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66dca5c9eef97_39366dca5c99b996.jpg)
Correct output

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
Get step-by-step solutions from verified subject matter experts
