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
denis23 [38]
3 years ago
12

What were precomputed tables and why were they necessary?​

Computers and Technology
2 answers:
Alex Ar [27]3 years ago
7 0

Answer:

In algorithms, precomputation is the act of performing an initial computation before run time to generate a lookup table that can be used by an algorithm to avoid repeated computation each time it is executed.

Alekssandra [29.7K]3 years ago
7 0
Yesterday’s comment is a good idea to have you on in your life if I can find a good job in the world of the control you can get in your life if you’re a real life or you can get your own job
You might be interested in
Write a C console application that will be used to determine if rectangular packages can fit inside one of a set of spheres. You
MatroZZZ [7]

Answer:

#include <cmath>

#include <iostream>

using namespace std;

int getSphereSize(double length, double breadth, double height) {

   double diagonal = sqrt(length * length + breadth * breadth + height * height);

   if (diagonal <= 4)

       return 4;

   if (diagonal <= 6)

       return 6;

   if (diagonal <= 8)

       return 8;

   if (diagonal <= 10)

       return 10;

   if (diagonal <= 12)

       return 12;

   return 0;

}

int main() {

   double length, breadth, height;

   int sphereCounts[5] = {0};

   int sphereSize;

   while (true) {

       // Get dimensions of the box

       cout << "Enter the dimensions of the box:\n";

       cout << "Length: ";

       cin >> length;

       cout << "Breadth: ";

       cin >> breadth;

       cout << "Height: ";

       cin >> height;

       if (length <= 0 || breadth <= 0 || height <= 0)

           break;

       sphereSize = getSphereSize(length, breadth, height);

       if (sphereSize == 0)

           cout << "The box cannot fit in any of the spheres";

       else

           cout << "The box can fit in the " << sphereSize << "-inch sphere";

       // Increment the counter

       if (sphereSize == 4)

           sphereCounts[0]++;

       else if (sphereSize == 6)

           sphereCounts[1]++;

       else if (sphereSize == 8)

           sphereCounts[2]++;

       else if (sphereSize == 10)

           sphereCounts[3]++;

       else if (sphereSize == 12)

           sphereCounts[4]++;

       cout << "\n\n";

   }

   cout << "\nNumber of 4-inch spheres: " << sphereCounts[0];

   cout << "\nNumber of 6-inch spheres: " << sphereCounts[1];

   cout << "\nNumber of 8-inch spheres: " << sphereCounts[2];

   cout << "\nNumber of 10-inch spheres: " << sphereCounts[3];

   cout << "\nNumber of 12-inch spheres: " << sphereCounts[4];

   cout << endl;

   return 0;

}

Explanation:

The "cmath" library is included in the c++ program. The getSphereSize function is used to return the sphere size the rectangle dimension can fit into. It program continuously prompts the user for the length, breadth, and height of the rectangle and passes the values to the getSphereSize function in the while but breaks if any or all of the variable value is zero.

The sizes of the sphere objects in inches are collected in an array of five integer values of zeros and are incremented by one for every match with a rectangle.

7 0
3 years ago
List three things that sally sue can improve
kirza4 [7]

Well for one, her ability to express her weaknesses.

3 0
3 years ago
Read 2 more answers
Which option is used in Access to locate and retrieve data that may be present in multiple database tables within the database?
ladessa [460]

Answer:

Subroutines

Explanation:

4 0
3 years ago
Read 2 more answers
Write a program to Test if mold is stored in the variable word.
Aloiza [94]

word = whatever value you want.

if "mold" in word:

   print("Mold is in the variable word.")

else:

   print("Mold is not in the variable word.")

7 0
3 years ago
Which group of Indians was native to Roanoke and not very friendly?
uysha [10]

Answer:

Croatan I think if I remember it right.

Explanation:

5 0
4 years ago
Read 2 more answers
Other questions:
  • My 2 in 1 laptop/tablet
    13·1 answer
  • In an e-credit card transaction the clearinghouse plays the following role:
    6·2 answers
  • The power saving state that saves all work to the hard drive and powers down the system is known by what term?
    11·1 answer
  • Complete the function by filling in the missing parts. The color_translator function receives the name of a color, then prints i
    11·1 answer
  • Trading stock or selling stock, selling real estate for profit, and selling other assets that gain value over time.
    13·1 answer
  • Need help with this one​
    5·1 answer
  • After inserting a video into your slide how can you test it
    11·1 answer
  • HTML, the markup language of the web, specifies colors using the RGB model. It uses a two-digit hexadecimal (that is, base 16) r
    13·1 answer
  • Write a program that simulates applying a "boost" to a spaceship in a spaceship race game.
    12·1 answer
  • Deirdre has a hearing disability. One of her friends advised her to use real-time text or RTT on her phone. In which of these
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!