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
oksano4ka [1.4K]
2 years ago
12

Write a recursive method called sumTo that accepts an integer parameter n and returns a real number representing the sum of the

first n reciprocals. In other words, sumTo(n) returns (1 1/2 1/3 1/4 ... 1/n). For example, sumTo(2) should return 1.5. The method should return 0.0 if it is passed the value 0 and throw an IllegalArgumentException if it is passed a value less than 0.
Computers and Technology
1 answer:
oksian1 [2.3K]2 years ago
7 0

Answer:

Sorry mate I tried it was wrong

Explanation:

Sorry again

You might be interested in
You discover that the lecturers will be using the laptops for online and video lecturing, and you see the need to upgrade the RA
Step2247 [10]

The RAM of G.Skill Trident Z Neo 3600 will be highly recommended for online and video lecturing.

<h3>What is RAM?</h3>

This is referred to random access memory and store information which can be retrieved quickly.

The RAM of G.Skill Trident Z Neo 3600 is 32GB which ensures the speed of the processor is fast.

Read more about RAM here brainly.com/question/13748829

#SPJ9

7 0
1 year ago
Read 2 more answers
PLEASE HELP ITS TIMED Ishmael would like to capture a selected portion of his screen and then capture actions he performs on tha
jek_recluse [69]

Answer:

Option B

<u><em>Hope this Helps!!! :)</em></u>

6 0
2 years ago
Write a subclass named 'ReadWrite' with the following additional behavior: Any necessary constructors. a method named 'setVal' t
nataly862011 [7]

Answer:

Java Class given below

Explanation:

class ReadOnly

{

protected int val;

public ReadOnly(int arg)

{

val = arg;

}

public int getVal()

{

return val;

}

}

class ReadWrite extends ReadOnly

{

private boolean dirty;

public ReadWrite(int arg)

{

super(arg);

dirty = false;

}

public void setVal(int arg)

{

val = arg;

dirty = true;

}

public boolean isDirty()

{

return dirty;

}

}

6 0
3 years ago
Create a structure representing a student. The member variables should include student name, student ID, and four test grades fo
Neporo4naja [7]

Answer:

Output:

Name: Brainly

ID:0001

Write the 4 tests grades of the student separated by space :10 9 8 10

Brainly

0001

10 9 8 10

Average :9.66667

'1' to continue '0' to exit :

Explanation:

#include<iostream>

#include<string>

using namespace std;

//variables declaration

struct Student {

  string id; //string declaration ID

  string name; // string declaration name

  int grades[4]; //array of 4 because it is 4 grades

};

//definition of the function get information

void inputData(Student &s){

 

   

   cout << "Name:" ;

   getline(cin,s.name);

   cout << "ID:";

   cin >> s.id;

   cout << "Write the 4 tests grades of the student separated by space :";

   for (int i = 0; i<4; i++)

       cin >> s.grades[i];

}

//definition of the function of average

double inputAvg(Student s){

   double summation;

   int temporary;

   double average;

   for (int i = 0; i<4; i++){  

      for (int j = i; j<4; j++){

         if (s.grades[j] > s.grades[i]){

             temporary = s.grades[i];

             s.grades[i] = s.grades[j];

             s.grades[j] = temporary;

         }

      }

    }

    summation = 0;

    for (int i = 0; i<3; i++){

        summation = summation + s.grades[i];  

    }

    average = summation/3;

    return average;

}

void disp(Student *s){

   cout << s->name << endl;

   cout << s->id << endl;

   for (int i = 0; i<4; i++)

       cout << s->grades[i] << " ";

   cout << endl;

   cout << "Average :" << inputAvg(*s) << endl;

   

}

int main(){

  Student st;

  int ch;

  while(true){

      inputData(st);

      disp(&st);

      cout << " '1' to continue '0' to exit :";

      cin >> ch;

      if (ch == 0)

         break;      

  }

  return 0;

}

6 0
2 years ago
The incident response team reviewed the security logs and discovered that the network had been breached, due to a misconfigured
natka813 [3]

Answer:

This is a failure of prevention model of computer security

Explanation:

Because the firewall was misconfigured so attack prevention mechanism failed to resist the attack and the security of computer is compromised. Prevention is an important model of operational security because <em>protection </em>is possible firstly attacks are prevented from targets and if not prevented and failed then they are detected and finally security department respond to that attack.

protection = <em>prevention   </em>if <em>prevention </em>failed than (detection+response)

4 0
3 years ago
Other questions:
  • What happens if you give false information on your driver license application?
    12·1 answer
  • What are the most popular/up-and-coming social media applications?
    10·2 answers
  • How can supply and demand for different careers affect job stability and income?
    6·1 answer
  • Compare the current in two lightbulbs wired in a series circuit
    11·1 answer
  • An unwanted program that can spread itself to other computers is called what?
    15·2 answers
  • Can y’all help me with these questions ?
    5·1 answer
  • Visual imagery encoding relates to _____ encoding, in that a person is connecting the new information to previously existing inf
    11·1 answer
  • What is file management?can please help me​
    14·2 answers
  • Why is lateral reading an important tool when reading material in social media or any online source
    15·1 answer
  • When adjusting the aperture, an F-stop of F32 lets in more light then a setting of F8
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!