Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 (xValueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started