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
tino4ka555 [31]
3 years ago
7

1) Create a recursive program that prompts the user for a nonnegative integer N and outputs. a) Sum [N] b) BiPower [N] c) TimesF

ive [N] Describe any input constraints in the opening comment of your recursive methods
Computers and Technology
1 answer:
Georgia [21]3 years ago
4 0

Answer:

//Code is created using java

import java.util.*;

// returns the sum

public int sum(int N)

{

if(N==1)

return (1);

else

return N+sum(N-1);

}

// code to return the Bipower ouput

public int BiPower(int N)

{

if(N==1)

return (2);

else

return 2*BiPower(N-1);

}

// Code to return TimesFive output

public int TimesFive(int N)

{

if(N==1)

return 5;

else

return 5 + timesFive(N-1);

}

public static void main(String args[])

   {

//Prompts the user to enter a nonnegative integer

       int N  = Integer.parseInt.(console.readLine("Enter a nonnegative integer:  "));

//Outputs the sum, Bipower and TimesFive

       System.out.println(sum(n));

       System.out.println(BiPower(n));  

       System.out.println(TimesFive(n));

   }

}

You might be interested in
What framework uses CSS to access and manipulate HTML elements?
Jlenok [28]

Answer:

The correct answer is JQuery

Explanation:

JQuery uses CSS to access and manipulate HTML elements.

4 0
3 years ago
Dan wants to check the layout of his web page content. What is the best way in which he can do this?
KatRina [158]
The answer is b I hope it helped
4 0
3 years ago
Read 2 more answers
Quick!! I'm TIMED!!!
agasfer [191]

Cloud suites are stored at a(n) option d. server on the Internet, rather than on your microcomputer.

<h3>What is a cloud at the Internet?</h3>

"The cloud" refers to servers which might be accessed over the Internet, and the software program and databases that run on the ones servers. Cloud servers are positioned in facts facilities all around the world.

A cloud suite is a cloud computing version that shops facts at the Internet via a cloud computing company who manages and operates facts garage as a service. It's brought on call for with just-in-time capability and costs, and gets rid of shopping for and handling your very own facts garage infrastructure.

Read more about the cloud suites :

brainly.com/question/5413035

#SPJ1

5 0
2 years ago
What are the differences, physically and logically, between the two printing configurations: Network-attached Printing and Netwo
evablogger [386]

Answer:

They are essentially the same physically. Logically, the print jobs are handled differently.

Explanation:

7 0
4 years ago
Manny has drafted an email message and configured a delivery option "Do not deliver before: 5:00 P.M. and today's date." He shut
erik [133]

In this scenario: C. the message will remain in Manny’s outbox until the computer is started and the Outlook program is started the next day.

<h3>What is Microsoft Outlook?</h3>

Microsoft Outlook simply refers to an e-mail and task management software application that is designed and developed by Microsoft Inc., so as to avail end users an ability to send electronic messages, schedule and plan their work activities on a timely basis.

Based on the time schedule, what would happen is that: C. the message will remain in Manny’s outbox until the computer is started and the Outlook program is started the next day.

Read more on Microsoft Outlook here: brainly.com/question/1538272

#SPJ1

7 0
2 years ago
Other questions:
  • An operating system cannot run from an external drive. true or false
    15·1 answer
  • To join two or more objects to make a larger whole is to _____________ them.
    11·2 answers
  • Nonverbal communication relies on _________________. a. multiple channels b. continuous feedback c. ambiguous interpretation d.
    9·1 answer
  • 2. Name the layer of the Web/Internet Protocol Stack with which each of these functions is associated.
    10·2 answers
  • PLEASE AWNSER 50 POINTS PLUS BRAINLEST ILL FAIL MY GRADE IF I DONT AWNSER IN A HOUR!
    15·1 answer
  • Write a C++ program that produces a simple personalized adventure game called Lost Fortune about a band of explorers that finds
    12·1 answer
  • A user input is when the user interacts with the program by typing.<br> True<br> False
    11·2 answers
  • What is the largest place value in a 12 bit binary number?
    10·1 answer
  • 3.6 code practice (edhesive)
    8·1 answer
  • Please explain a function in coding.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!