1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
balandron [24]
3 years ago
14

Write a recursive method to compute the following series: 1 + 1/2 + 1/3 + 1/i ... Write a test program that displays m(i) for i

= 1, 2, . . ., 10. You are not allowed to construct any structured objects (no array, ArrayList, String, StringBuilder, etc) and you may not use a while loop, for loop, or do/while loop to solve this problem; you must use recursion.

Computers and Technology
1 answer:
White raven [17]3 years ago
8 0

We will assume that i / 1 is constant and i express i = 1 / n while n = 1,2,3,4,5,6,7 ..

You might be interested in
Word can store a maximum of how many documents in its Recent Documents area? five ten fifteen twenty
djyliett [7]
The answer is twenty.
5 0
3 years ago
Define the missing method. licenseNum is created as: (100000 * customID) licenseYear, where customID is a method parameter. Samp
g100num [7]

Answer:

I am writing the program in JAVA and C++

JAVA:

public int createLicenseNum(int customID){  //class that takes the customID as parameter and creates and returns the licenseNum

       licenseNum = (100000 * customID) + licenseYear;  //licenseNum creation formula

       return(licenseNum);     }

In C++ :

void DogLicense::CreateLicenseNum(int customID){ //class that takes the customID as parameter and creates the licenseNum

licenseNum = (100000 * customID) + licenseYear; } //licenseNum creation formula

Explanation:

createLicenseNum method takes customID as its parameter. The formula inside the function is:

licenseNum = (100000 * customID) + licenseYear;

This multiplies 100000 to the customID and adds the result to the licenseYear and assigns the result of this whole expression to licenseNum.

For example if the SetYear(2014) means the value of licenseYear is set to 2014 and CreateLicenseNum(777) this statement calls createLicenseNum method by passing 777 value as customID to this function. So this means licenseYear = 2014 and customID  = 777

When the CreateLicenseNum function is invoked it computes and returns the value of licenseNum as:

licenseNum = (100000 * customID) + licenseYear;

                     = (100000 * 777) + 2014

                     = 77700000 + 2014

licenseNum = 77702014                                                                                                        

So the output is:

Dog license: 77702014          

To call this function in JAVA:

public class CallDogLicense {

public static void main(String[] args) {//start of main() function

    DogLicense dog1 = new DogLicense();//create instance of Dog class

dog1.setYear(2014); // calls setYear passing 2014

dog1.createLicenseNum(777);// calls createLicenseNum passing 777 as customID value

System.out.println("Dog license: " + dog1.getLicenseNum()); //calls getLicenseNum to get the computed licenceNum value

return; } }

Both the programs along with the output are attached as a screenshot.

3 0
3 years ago
Read 2 more answers
Which of the following protects against cave-ins? A. All answer choices protect against cave-ins B. Shielding C. Shoring D. Slop
babunello [35]
I think it is b idk if it is 100% right
4 0
3 years ago
Read 2 more answers
Which statement best describes network security
Andreyy89
<span>B.network security means all personal information is kept safe the network is not compromised and only authorized users had access 

Im pretty sure they ment has instead of had</span><span />
3 0
3 years ago
Read 2 more answers
Which top-level domain can be used by anyone, regardless of their affiliation?
Firdavs [7]

Answer:

C. org

Explanation:

org is an open domain so anyone is allowed to register a .org domain

7 0
2 years ago
Other questions:
  • To select all the text in a document, press ____.
    12·2 answers
  • Why might people feel differently about their digital lives?
    11·1 answer
  • Electromagnetic waves used in ovens and cell phone communications are called
    6·1 answer
  • If a 120 V appliance requires 15 A to operate, what is the resistance of the appliance?
    10·1 answer
  • How do you screen shot and copy paste the screenshot from chrome book
    11·2 answers
  • Which descriptions offer examples of Correction Services workers? Select all that apply.
    8·1 answer
  • . Define the process of Technological relationship
    12·1 answer
  • Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a cowor
    7·1 answer
  • Dion Training has hired you to assess its voucher fulfillment web application on its e-commerce website. The web application rel
    9·1 answer
  • What are some of the most common obstacles in video games?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!