Question: Please program in C++ Program 4. Write a function: double zeta( double x) // here x must be > 1.0 to compute and return the

Please program in C++

Please program in C++ Program 4. Write a function: double zeta( double

Program 4. Write a function: double zeta( double x) // here x must be > 1.0 to compute and return the value of the sum Note that n is not a parameter of the function. Your while loop should stop adding once the term 1/k" becomes smaller than 10 parameter n and print the zeta value 10 Then in main function use a while loop to read values of the Program 5. Write a function int arithmeticsum( unsigned int a, unsigned int k, unsigned int n) to compute and return the value of the sum of the first n terms of an arithmetic sequence: a, a + k, a + 2k, . . . a + (n-1): where a and k are positive integers. The main function use a while loop to read values a, k, n and rint the sum with each iteration Program 6. Using the function: bool isprime( unsigned int n ) write a program to construct a vector of the first n prime numbers. Your program should 1. read in 2. use a while loop starting with 2 and with each iteration going up by one. 3. if a number is prime, add it to the vector; 4. finish the loop once n primes have been added. 5. Print the vector in the following fashion: supposing that n -10 your code should print primes[10]-2, 3, 5, 7, 11, 13, 17, 19, 23, 29)

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!