Question: please id nead the answer using java language i need the answer very fast Problem #1 a) Write a method that calculates the result of

 please id nead the answer using java language i need the

please id nead the answer using java language i need the answer very fast

Problem #1 a) Write a method that calculates the result of the following formula: x + (x + k) + (x + 2K)2 + (x + 3k) + ... + (x + nk)? The header of the method is as follows public static double sum (double x, double k, int n) b) Write a main method in which you ask the user to enter the value of x, and then call the sum method to print the result of the above sum with k = 2.5 and n = 10. Sample run 1: Enter the value of x: 4.5 The result of the sum is: 3866.5 Sample run 2 : Enter the value of x: -1.2 The result of the sum is: 2092.09

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!