1. (1 pt) Suppose you wish to run a program P with 37.5 x 109instructions on a 15 GHz machine with a CPI of 0.75. What is the expected CPU time to execute this program on this machine

Answers

Answer 1
Answer:

Answer:

Expected CPU time: 1.875 seconds.


Related Questions

Suppose that each country completely specializes in the production of the good in which it has a comparative advantage, producing only that good. Inthis case, the country that produces rye will produce million bushels per week, and the country that produces jeans will producemillion pairs per week.
An 'array palindrome' is an array, which, when its elements are reversed, remains the same. Write a recursive function, isPalindrome, that accepts a tuple and returns whether the tuple is a palindrome. A tuple is a palindrome if: the tuple is empty or contains one element the first and last elements of the tuple are the same, and the rest of the tuple is a palindrome
In real-world environments, once the domains that are affected by the risks are identified, subsequent next steps would include:______.
- If we place records from different tables in adjacent____________, it would increase efficiency of a database.Physical locationTableFormempty location
What component can be used for user input or display of output?JButtonJLabelJTextFieldJFrame

Manufactured computers and cell phones are part of which industry? Electronics Chemicals Machinery Metal products

Answers

Answer:

The correct answer is the electronic industry

Hope this helps

Answer:

Electronics

Explanation:

How do you calculate the total resistance in a series circuit with more than one resistor?

Answers

Resistors are said to be connected in series when they are daisy chained together in a single line. The serial circuit of resistors result  has a common current flowing through the resistors.
The current that flows through one resistor must also flow through the others.

The total equivalent resistance, is given as:

Rtotal = R1 + R2 + R3 , where R1 is the resistance of the first resistor, R2 of the second and R3 f the third

What is the use of form in HTML​

Answers

Answer:

to make the internet faster

Explanation:

becuase it will have a faster act on the computer so the computer could process the information for it later to be used

Write the prototype for a function named showSeatingChart that will accept the following two-dimensional array as an argument. const int ROWS = 20; const int COLS = 40; string seatingChart[ROWS][COLS]; Note: The two-dimensional array argument must be a const string array. You must include a second integer argument (scalar, not an array).

Answers

Answer:

See explaination

Explanation:

void showSeatingChart(string seatingChart[20][40], const int ROWS, const int COLS){

for(int i = 0;i<ROWS;i++){

for(int j = 0;j<COLS;j++){

cout<<seatingChart[i][j]<<" ";

}

cout<<endl;

}

}

e interesting application of two-dimensional arrays is magic squares. A magic square is a square matrix in which the sum of every row, every column, and both diagonals is the same. Magic squares have been studied for many years, and there are some particularly famous magic squares. Write a program to determine whether a series of square matrices are magic or not. The first line of input for each square specifies the size of the square(number of rows and columns). The square elements follow, one row per line. The end of the data is indicated by -1. Create a class called Square that has methods to construct a square of a specified size, to read in the elements of t

Answers

Answer:

Check the explanation

Explanation:

// Define a Square class with methods to create and read in

// info for a square matrix and to compute the sum of a row,

// a column, either diagonal, and whether it is magic.

//

// ****************************************************************

import java.util.Scanner;

import java.io.*;

public class Square {

int[][] square;

//--------------------------------------

//create new square of given size

//--------------------------------------

public Square(int size) {

square = new int[size][size];

}

//-----------------------------------------------

//return the sum of the values in the given row

//-----------------------------------------------

public int sumRow(int row) {

// Add your code here

int sum = 0;

for (int i = 0; i < square.length; i++) {

sum = sum + square[row][i];

}

return sum;

}

//-------------------------------------------------

//return the sum of the values in the given column

//-------------------------------------------------

public int sumCol(int col) {

// Add your code here

int sum = 0;

for (int i = 0; i < square.length; i++) {

sum = sum + square[i][col];

}

return sum;

}

//---------------------------------------------------

//return the sum of the values in the main diagonal

//---------------------------------------------------

public int sumMainDiag() {

// Add your code here

int sum = 0;

for (int i = 0; i < square.length; i++) {

sum = sum + square[i][i];

}

return sum;

}

//---------------------------------------------------------------

//return the sum of the values in the other ("reverse") diagonal

//---------------------------------------------------------------

public int sumOtherDiag() {

// Add your code here

int sum = 0;

for (int i = 0; i < square.length; i++) {

sum = sum + square[square.length - i - 1][i];

}

return sum;

}

//-------------------------------------------------------------------

//return true if the square is magic (all rows, cols, and diags have

//same sum), false otherwise

//-------------------------------------------------------------------

public boolean magic() {

// Add your code here. Check if the sum of main diagonal equals the other diagonal,

// also if all rows and all columns sums equal to the diagonal as well. Any uneuqal will

// terminate the comparison.

int d1 = sumMainDiag();

int d2 = sumOtherDiag();

if (d1 != d2) {

return false;

}

for (int i = 0; i < square.length; i++) {

if (d1 != sumRow(i) || d1 != sumCol(i)) {

return false;

}

}

return true;

}

//----------------------------------------------------

//read info into the square from the standard input.

//----------------------------------------------------

public void readSquare(Scanner scan) {

for (int row = 0; row < square.length; row++) {

for (int col = 0; col < square.length; col++) {

square[row][col] = scan.nextInt();

}

}

}

//---------------------------------------------------

//print the contents of the square, neatly formatted

//---------------------------------------------------

public void printSquare() {

for (int row = 0; row < square.length; row++) {

for (int col = 0; col < square.length; col++) {

System.out.print(square[row][col] + "\t");

}

System.out.println();

}

}

}

// ****************************************************************

// SquareTest.java

//

// Uses the Square class to read in square data and tell if

// each square is magic.

//

// ****************************************************************

class SquareTest {

public static void main(String[] args) throws IOException {

File file = new File("magicData.txt");

Scanner scan = new Scanner(file);

int count = 1; //count which square we're on

int size = scan.nextInt(); //size of next square

//Expecting -1 at bottom of input file

while (size != -1) {

//create a new Square of the given size

Square magicSquare = new Square(size);

//call its read method to read the values of the square

magicSquare.readSquare(scan);

System.out.println("\n******** Square " + count + " ********");

//print the square

magicSquare.printSquare();

//print the sums of its rows

for (int row = 0; row < size; row++) {

System.out.println("Sum of row " + row + ": "

+ magicSquare.sumRow(row));

}

//print the sums of its columns

for (int col = 0; col < size; col++) {

System.out.println("Sum of column " + col + ": "

+ magicSquare.sumCol(col));

}

//print the sum of the main diagonal

System.out.println("Sum of the main diagonal: "

+ magicSquare.sumMainDiag());

//print the sum of the other diagonal

System.out.println("Sum of the other diagonal: "

+ magicSquare.sumOtherDiag());

//determine and print whether it is a magic square

if (magicSquare.magic()) {

System.out.println("It's a magic square!");

} else {

System.out.println("It's not a magic square!");

}

System.out.println();

//get size of next square

size = scan.nextInt();

count++;

}

}

}

Answer:

See explaination

Explanation:

/ Define a Square class with methods to create and read in

// info for a square matrix and to compute the sum of a row,

// a column, either diagonal, and whether it is magic.

//

// ************************************************************

import java.util.Scanner;

import java.io.*;

public class Square {

int[][] square;

//--------------------------------------

//create new square of given size

//--------------------------------------

public Square(int size) {

square = new int[size][size];

}

//-----------------------------------------------

//return the sum of the values in the given row

//-----------------------------------------------

public int sumRow(int row) {

// Add your code here

int sum = 0;

for (int i = 0; i < square.length; i++) {

sum = sum + square[row][i];

}

return sum;

}

//-------------------------------------------------

//return the sum of the values in the given column

//-------------------------------------------------

public int sumCol(int col) {

// Add your code here

int sum = 0;

for (int i = 0; i < square.length; i++) {

sum = sum + square[i][col];

}

return sum;

}

//---------------------------------------------------

//return the sum of the values in the main diagonal

//---------------------------------------------------

public int sumMainDiag() {

// Add your code here

int sum = 0;

for (int i = 0; i < square.length; i++) {

sum = sum + square[i][i];

}

return sum;

}

//---------------------------------------------------------------

//return the sum of the values in the other ("reverse") diagonal

//---------------------------------------------------------------

public int sumOtherDiag() {

// Add your code here

int sum = 0;

for (int i = 0; i < square.length; i++) {

sum = sum + square[square.length - i - 1][i];

}

return sum;

}

//-------------------------------------------------------------------

//return true if the square is magic (all rows, cols, and diags have

//same sum), false otherwise

//-------------------------------------------------------------------

public boolean magic() {

// Add your code here. Check if the sum of main diagonal equals the other diagonal,

// also if all rows and all columns sums equal to the diagonal as well. Any uneuqal will

// terminate the comparison.

int d1 = sumMainDiag();

int d2 = sumOtherDiag();

if (d1 != d2) {

return false;

}

for (int i = 0; i < square.length; i++) {

if (d1 != sumRow(i) || d1 != sumCol(i)) {

return false;

}

}

return true;

}

//----------------------------------------------------

//read info into the square from the standard input.

//----------------------------------------------------

public void readSquare(Scanner scan) {

for (int row = 0; row < square.length; row++) {

for (int col = 0; col < square.length; col++) {

square[row][col] = scan.nextInt();

}

}

}

//---------------------------------------------------

//print the contents of the square, neatly formatted

//---------------------------------------------------

public void printSquare() {

for (int row = 0; row < square.length; row++) {

for (int col = 0; col < square.length; col++) {

System.out.print(square[row][col] + "\t");

}

System.out.println();

}

}

}

// ****************************************************************

// SquareTest.java

//

// Uses the Square class to read in square data and tell if

// each square is magic.

//

// ****************************************************************

class SquareTest {

public static void main(String[] args) throws IOException {

File file = new File("magicData.txt");

Scanner scan = new Scanner(file);

int count = 1; //count which square we're on

int size = scan.nextInt(); //size of next square

//Expecting -1 at bottom of input file

while (size != -1) {

//create a new Square of the given size

Square magicSquare = new Square(size);

//call its read method to read the values of the square

magicSquare.readSquare(scan);

System.out.println("\n******** Square " + count + " ********");

//print the square

magicSquare.printSquare();

//print the sums of its rows

for (int row = 0; row < size; row++) {

System.out.println("Sum of row " + row + ": "

+ magicSquare.sumRow(row));

}

//print the sums of its columns

for (int col = 0; col < size; col++) {

System.out.println("Sum of column " + col + ": "

+ magicSquare.sumCol(col));

}

//print the sum of the main diagonal

System.out.println("Sum of the main diagonal: "

+ magicSquare.sumMainDiag());

//print the sum of the other diagonal

System.out.println("Sum of the other diagonal: "

+ magicSquare.sumOtherDiag());

//determine and print whether it is a magic square

if (magicSquare.magic()) {

System.out.println("It's a magic square!");

} else {

System.out.println("It's not a magic square!");

}

System.out.println();

//get size of next square

size = scan.nextInt();

count++;

}

}

}

What is a software? 2 sentences please, I'll mark u as brailiest

Answers

Answer:

Computer software, or simply software, is a collection of data or computer instructions that tell the computer how to work. This is in contrast to physical hardware, from which the system is built and actually performs the work.

Explanation: