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
can someone please help me with my school work you can look under my questions please help me ​my mom is going to kill me when s
Snezhnost [94]

Answer:

hey panda I'm doing good how about you

5 0
3 years ago
You are researching RAM for a computer you are building for a friend who will be using the system as a home office server for he
AlexFokin [52]

Answer:

ECC memory

Explanation:

According to my research on information technology, I can say that based on the information provided within the question the best type of RAM for this situation would be ECC memory (RAM). This abbreviation refers to Error-Correcting-Code, this memory can detect and correct many common types of errors, and is used mainly for servers or when sensitive data is involved where errors and data corruption cannot be allowed to happen under any circumstance.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

3 0
3 years ago
to save a revised document as the original name and in the original file location, a user should select _____. save as file new
Schach [20]
The answer is just save
5 0
3 years ago
Read 2 more answers
Multiple Select Which conditions make using an array a better choice than a list? Select 3 options. when your list would contain
zalisa [80]

Answer:

when you have a very large quantities of numeric data values

when efficiency is of great importance

when you will do a great deal of arithmetic calculations

Explanation:

got it right in edg 2021

6 0
3 years ago
Where can I easily find an easy app or program to use for making/editing videos?
GalinKa [24]
I think imovie is a good editing app for free. It is in the apple app store.  Most editing programs are not for free
6 0
3 years ago
Other questions:
  • System memory is on a computer motherboard?
    14·2 answers
  • What linux command displays the ip address and subnet mask?
    11·1 answer
  • How can you take a picture of work on here?????
    9·1 answer
  • Which of the following is not true about designing classes? In order for class information to be printed instead of a memory add
    12·1 answer
  • If you use the assign software to a user option, how does the new software install to the user's computer? 70-411
    10·1 answer
  • What is modularity? Help asap
    9·1 answer
  • when working with smart which tab would provide the ability to change the shape or size of the smart art shapes
    15·2 answers
  • Write the function powersOf3ToN(n) that takes a possibly-negative float or int n, and returns a list of the positive powers of 3
    10·1 answer
  • What is computer software​
    9·1 answer
  • What is hardware?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!