Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

public class Quiz3 { public static void main ( String[] args ) { int n= 50 ; double x = 10 ; double y= 0

public class Quiz3{ public static void main(String[] args){ int n=50; double x = 10; double y=0, z=0; // your code  System.out.println("y = "+y); System.out.println("z = "+z); }}
image text in transcribed
Download file Qui23.ava and develop the program to calculate and print the values ofy for the given values of X and n from following formula. Compile and run the program. and at the end upload the code to quiz3 drop box in assignment menu. _ _12 34 n y_ _ + + + +...+ i1+12 34 5 n _ " x+i_x+1 x+2 x+3 x+4 x+n ZZi 1 + 2 + 3 + 4 +_.,+ n i x x x x x x note that n takes values of 1 to n. For example for x =3 and n = 5, then the formulas will be 1 2 3 4 5 y:++++ 2 3 4 5 6 3+1 3+2 3+3 3+4 3+5 z=++++ 31 32 33 34 35 and the answers for (x =10 , n = 50) will be equal to y 2 46.481186818533295 z 2 1.2345679012345683

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

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions