Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions