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
geniusboy [140]
3 years ago
8

Give a recursive algorithm for finding the sum of the first n odd positive integers.

Computers and Technology
1 answer:
Andrei [34K]3 years ago
3 0
I'm writing that in some sort of pseudocode; if you don't understand it, feel free to ask for more details in the comments.

function sumOdd(n)
    if n==1 then
        return 1
    end if
    return (sumOdd(n-1))+(n*2-1)
end function
You might be interested in
Whats 9+9+9+9x999-86 divided by 874 times 8764
Alexxandr [17]

Answer:

8155.63844394

Explanation:

6 0
3 years ago
Read 2 more answers
•
Natali [406]

Answer:

ion k srry

Explanation:

3 0
3 years ago
What is rss A)real time story service B) real time story syndication C) really simple syndicationD)rapid story services
Novosadov [1.4K]

C) Really Simple Syndication

4 0
3 years ago
Design and implement a program that reads a series of 10 integers from the user and prints their average. Read each input value
irina [24]

Answer:

Explanation:

The following program was written in Java. It creates a loop that asks the user for numbers. If it can convert it to an integer it accepts it and adds it to the sum variable otherwise it ouputs that it is not a valid number. Once all 10 integers are added it prints the Average of the values entered.

import java.util.ArrayList;

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int count = 0;

       int sum = 0;

       while (count != 10) {

           System.out.println("Enter a number: ");

           String answer = in.nextLine();

           try {

               int intAnswer = Integer.parseInt(answer);

               sum += intAnswer;

               count += 1;

           } catch (NumberFormatException e) {

               System.out.println("Not a valid number.");

           }

       }

       int average = sum / count;

       System.out.println("Average: " + average);

   }

}

3 0
3 years ago
Operations that run in protected mode must go through which of the following before they can access a computer’s hardware? A. Ke
HACTEHA [7]

Answer:

Option A (Kernal) seems to be the right answer.

Explanation:

  • A Kernel appears to be the central component of such an OS. This handles machine as well as hardware activities, including most importantly storage as well as CPU power.
  • This manages the majority of the initialization as well as program input/output requests, converting them into CPU data-processing commands.

The other given option are not related to the given circumstances. So that option A would be the right answer.

3 0
3 years ago
Other questions:
  • Which option can Jesse use to customize her company’s logo, name, address, and similar details in all her business documents?
    7·1 answer
  • PLEASE HELP POWER POINT:
    8·2 answers
  • When the _____ logical operator is used to combine keywords, a search engine will retrieve all results containing either keyword
    7·2 answers
  • You need to deploy a new cloud-based windows intune deployment to manage mobile devices in your organization. drag and drop the
    5·1 answer
  • Pls help me
    5·1 answer
  • The introduction of new information technology has a: A. dampening effect on the discourse of business ethics. B. waterfall effe
    14·1 answer
  • What are the 2 things you are not sure about evaluating functions​
    7·2 answers
  • Explain why it is important to follow a course or a program in keeping with your value system​
    13·1 answer
  • What is the d/c b/n information rich and information poor society​
    13·1 answer
  • Write a structure declaration to hold the following data about a savings account: Account Number (string object) Account Balance
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!