Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write statements that can be used in a Java program to computea point on a line.

ID: 3613394 • Letter: W

Question

Write statements that can be used in a Java program to computea point on a line. First, read in two integer values, a and b. Prompt the user to input avalue and read that into x. finally, display the valuesof the point on the line, x and ax + b. I'm not sure how to get started on this. Any help will beappreciated. Write statements that can be used in a Java program to computea point on a line. First, read in two integer values, a and b. Prompt the user to input avalue and read that into x. finally, display the valuesof the point on the line, x and ax + b. I'm not sure how to get started on this. Any help will beappreciated. I'm not sure how to get started on this. Any help will beappreciated.

Explanation / Answer

please rate - thanks import java.util.*; public class untitled { public static void main(String args[]) {int a,x,b; Scanner in =new Scanner(System.in); System.out.println("Enter a value for a: "); a=in.nextInt(); System.out.println("Enter a value for b: "); b=in.nextInt(); System.out.println("Enter a value for x: "); x=in.nextInt(); System.out.println(" The points on the line are "+x+" and"+(a*x+b)); } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote