solve this question in java language Transcribed Image Text: Write a program that prompts the user to enter an integer (n) and a sum

solve this question in java language Transcribed Image Text: Write a program that prompts the user to enter an integer (n) and a sum
value (s). The program checks the value of (n + n), if it is less than or
greater than the entered sum (s), the program finds the needed value to
be added to or subtracted from (n + n) in order to reach the given sum
(s) and displays it, otherwise it displays that n +n=sum.
Sample Run1:
Enter an integer: 5
Enter a
sum: 25
You need to add 15 to reach the sum.
Sample Run2:
Enter an integer: 8
6.
Enter a
sum:
You need to subtract 10 to reach the sum.
Sample Run3:
Enter an integer:
7
Enter a
sum:
14
7 + 7 =
14.

-25-


Buy plagiarism free, original and professional custom paper online now at a cheaper price. Submit your order proudly with us



Essay Hope