answer.
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
jek_recluse [69]
1 year ago
15

Again, suppose that n and r denote integer values where r > 0 and n ≥ 0. What are two "simple" values, say lowEnough and tooH

igh, such that lowEnough ≤ ⌊n√r⌋⌊nr⌋ < tooHigh. Explain based on your answer to the previous question.
Suppose you would like to know ⌊47226−−−−−√5⌋⌊472265⌋. Explain how you could find ⌊47226−−−−−√5⌋⌊472265⌋ using a guess and verify method. Note: Explain your answer by relating this problem to the number guessing game described earlier. Think about what would be an appropriate question to use in place of "Is secret_number < guess_number?" and think about good choices for the starting values of lowEnough and tooHigh.
Computers and Technology
1 answer:
enyata [817]1 year ago
6 0

Answer:

Answer explained

Explanation:

From the previous question we know that while searching for n^(1/r) we don't have to look for guesses less than 0 and greater than n. Because for less than 0 it will be an imaginary number and for rth root of a non negative number can never be greater than itself. Hence lowEnough = 0 and tooHigh = n.

we need to find 5th root of 47226. The computation of root is costlier than computing power of a number. Therefore, we will look for a number whose 5th power is 47226. lowEnough = 0 and tooHigh = 47226 + 1. Question that should be asked on each step would be "Is 5th power of number < 47227?" we will stop when we find a number whose 5th power is 47226.

You might be interested in
given:an int variable k,an int array currentMembers that has been declared and initialized,an int variable memberID that has bee
Oksi-84 [34.3K]

Answer:

// The code segment is written in C++ programming language

// The code segment goes as follows

for (k = 0; k < nMembers; k++)

{

//check if memberID can be found in currentMembers

if (currentMembers[k] == memberID){

// If yes,

// assigns true to isAMember

isAMember = true;

k = nMembers;

}

else{

isAMember = false;

// If no

// assigns false to isAMember

}

}

// End of segment:

The following assumption were made in the code segment above.

There exists

1. An already declared and initialised int array currentMembers.

2. An already initialised int variable memberID

Line 3 initiates a loop to scan through the array

Line 6 checks for the condition below

If current element of array equals memberID then

It assigns true to isAMember and nMembers to k

Else

It assigns false to isAMember

7 0
2 years ago
Type the correct answer in the box. Spell all words correctly.
kvasek [131]

Answer:

Presentations?

Explanation:

6 0
2 years ago
Write a method that accepts a String object as an argument and displays its contents backward. For instance, if the string argum
Nata [24]

Answer:

// importing the necessary libraries

import java.util.Scanner;

public class BackwardString {

public static void main(String[] args) {

String input;

// Scanner object to read string from user input

Scanner scanner = new Scanner(System.in);

System.out.print("Enter String here : ");

input=scanner.next();

// calling backward method to reverse passed string

backward(input);

// closing Scanner object

scanner.close();

}

// Method to Reverse the input string

private static void backward(String source) {

int i, len = source.length();

StringBuilder dest = new StringBuilder(len);

for (i = (len - 1); i >= 0; i--){

dest.append(source.charAt(i));

}

System.out.println("Reversed String : "+dest);

}

}

Explanation:

// importing the necessary libraries

import java.util.Scanner;

public class BackwardString {

public static void main(String[] args) {

String input;

// Scanner object to read string from user input

Scanner scanner = new Scanner(System.in);

System.out.print("Enter String here : ");

input=scanner.next();

// calling backward method to reverse passed string

backward(input);

// closing Scanner object

scanner.close();

}

// Method to Reverse the input string

private static void backward(String source) {

int i, len = source.length();

StringBuilder dest = new StringBuilder(len);

for (i = (len - 1); i >= 0; i--){

dest.append(source.charAt(i));

}

System.out.println("Reversed String : "+dest);

}

}

The program above accepts a String object as an argument and displays its contents backward.

It reverses the any string inputed while producing the output.

6 0
2 years ago
Which of the following is not considered hardware? Monitor Mouse Windows Keyboard Printer
Dima020 [189]
A hardware helps to set up the computer to do things with. A monitor, mouse, keyboard, and printer all help to interact with the computer to make it work. Windows would not be considered a hardware because it is downloaded onto the computer to enhance the computer or to make the computer better
7 0
2 years ago
Diane and Benjamin work at the U.S. office of their company. Through their special mentoring relationship, Diane, a senior membe
balandron [24]

Answer:CO-MENTORING RELATIONSHIP.

Explanation: CO-MENTORING RELATIONSHIP is a type of relationship between two individuals,where both have a unique or Special skill set to offer to the other party.

This is the type of relationship between DAINE AND BENJAMIN,is is a kind of mutually beneficial Relationships as DAINE will offer her greatly improved technical skills to Benjamin who in turn will offer or mentor Daine on streamlining work habits to accomplish reports quickly.

3 0
2 years ago
Other questions:
  • Mechanical advantage is the ratio of the force required to move a load divided by______
    12·1 answer
  • . Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
    15·1 answer
  • There are many different types of hardware devices, different manufacturers, and countless configuration possibilities. Explain
    14·1 answer
  • Cooper Technologies is a technology company that offers many IT services in Chicago. The company's services and products include
    6·1 answer
  • Lin is booting up his computer, and during the boot process, the computer powers down. After several unsuccessful attempts to bo
    12·1 answer
  • A good way to avoid skids is to _____ when coming into a turn. A. accelerate B. decelerate C. counter steer D. cover brake
    8·2 answers
  • What output is produced by the following program segment? Why? (Recall that name.charAt(i) is the i-th character in the string,
    11·1 answer
  • A packet analyzer is a program that can enable a hacker to do all of the following EXCEPT ________. Select one: A. assume your i
    6·1 answer
  • PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
    6·1 answer
  • Given the macro definition and global declarations shown in the image below, provide answers to the following questions:
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!