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
lorasvet [3.4K]
2 years ago
6

Write multiple if statements:

Engineering
1 answer:
lora16 [44]2 years ago
3 0
Zrizorzlzfxxxgoxxxxpgxtoxxxhxuxyf
You might be interested in
A turbine operates at steady state, and experiences a heat loss. 1.1 kg/s of water flows through the system. The inlet is mainta
strojnjashka [21]

Answer:

\dot W_{out} = 399.47\,kW

Explanation:

The turbine is modelled after the First Law of Thermodynamics:

-\dot Q_{out} -\dot W_{out} + \dot m\cdot (h_{in}-h_{out}) = 0

The work done by the turbine is:

\dot W_{out} = \dot m \cdot (h_{in}-h_{out})-\dot Q_{out}

The properties of the water are obtained from property tables:

Inlet (Superheated Steam)

P = 10\,MPa

T = 520\,^{\textdegree}C

h = 3425.9\,\frac{kJ}{kg}

Outlet (Superheated Steam)

P = 1\,MPa

T = 280\,^{\textdegree}C

h = 3008.2\,\frac{kJ}{kg}

The work output is:

\dot W_{out} = \left(1.1\,\frac{kg}{s}\right)\cdot \left(3425.9\,\frac{kJ}{kg} -3008.2\,\frac{kJ}{kg}\right) - 60\,kW

\dot W_{out} = 399.47\,kW

5 0
3 years ago
If you stretch a rubber hose and pluck it, you can observe a pulse traveling up and down the hose. What happens to the speed of
stich3 [128]

Answer:

Explanation:if you stretch the hose more tightly the speed of the pulse will reduce..

5 0
3 years ago
How to get on your screen on 2k20 in every mode
VashaNatasha [74]
D pad or rb or lb hop this helps
5 0
2 years ago
Read 2 more answers
Technician A says that a voltage drop of 0.8 volts on the starter ground circuit is within specifications. Technician B says tha
Romashka-Z-Leto [24]

Answer:

Technician A is wrong

Technician B is right

Explanation:

voltage drop of 0.8 volts on the starter ground circuit is not within specifications. Voltage drop should be within the range of 0.2 V to 0.6 V but not more than that.

A spun bearing can seize itself around the crankshaft journal causing it not to move. As the car ignition system is turned on, the stater may draw high current in order to counter this seizure.

8 0
3 years ago
computer language C++ (Connect 4 game)( this is all the info that was givin no input or solution) I used the most recent version
Mariana [72]

Answer:

C++ code explained below

Explanation:

#include "hw6.h"

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

// Constructor function

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

Connect4::Connect4()

{

ClearBoard();

}

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

// Destructor function

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

Connect4::~Connect4()

{

// Intentionally empty

}

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

// Clear the Connect4 board

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

void Connect4::ClearBoard()

{

// Initialize Connect4 board

for (int c = 0; c < COLS; c++)

for (int r = 0; r < ROWS; r++)

board[r][c] = ' ';

// Initialize column counters

for (int c = 0; c < COLS; c++)

count[c] = 0;

}

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

// Add player's piece to specified column in board

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

bool Connect4::MakeMove(int col, char player)

{

// Error checking

if ((col < 0) || (col >= COLS) || (count[col] >= ROWS))

return false;

// Make move

int row = count[col];

board[row][col] = player;

count[col]++;

return true;

}

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

// Check to see if player has won the game

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

bool Connect4::CheckWin(char player)

{

// Loop over all starting positions

for (int c = 0; c < COLS; c++)

for (int r = 0; r < ROWS; r++)

if (board[r][c] == player)

{

// Check row

int count = 0;

for (int d = 0; d < WIN; d++)

if ((r+d < ROWS) &&

(board[r+d][c] == player)) count++;

if (count == WIN) return true;

 

// Check column

count = 0;

for (int d = 0; d < WIN; d++)

if ((c+d < COLS) &&

(board[r][c+d] == player)) count++;

if (count == WIN) return true;

 

// Check first diagonal

count = 0;

for (int d = 0; d < WIN; d++)

if ((r+d < ROWS) && (c+d < COLS) &&

(board[r+d][c+d] == player)) count++;

if (count == WIN) return true;

 

// Check second diagonal

count = 0;

for (int d = 0; d < WIN; d++)

if ((r-d >= 0) && (c+d < COLS) &&

(board[r-d][c+d] == player)) count++;

if (count == WIN) return true;

}

return false;

}

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

// Print the Connect4 board

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

void Connect4::PrintBoard()

{

// Print the Connect4 board

for (int r = ROWS-1; r >= 0; r--)

{

// Draw dashed line

cout << "+";

for (int c = 0; c < COLS; c++)

cout << "---+";

cout << "\n";

// Draw board contents

cout << "| ";

for (int c = 0; c < COLS; c++)

cout << board[r][c] << " | ";

cout << "\n";

}

// Draw dashed line

cout << "+";

for (int c = 0; c < COLS; c++)

cout << "---+";

cout << "\n";

// Draw column numbers

cout << " ";

for (int c = 0; c < COLS; c++)

cout << c << " ";

cout << "\n\n";

}

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

// Main program to play Connect4 game

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

int main()

{

  int choice;

  int counter = 0;

  srand (time(NULL));

  Connect4 board;

  cout << "Welcome to Connect 4!" << endl << "Your Pieces will be labeled 'H' for human. While the computer's will be labeled 'C'" << endl;

  board.PrintBoard();

  cout << "Where would you like to make your first move? (0-6)";

  cin >> choice;

  while (board.MakeMove(choice,'H') == false){

  cin >> choice;

  }

  counter++;

  while (board.CheckWin('C') == false && board.CheckWin('H') == false && counter != 21){

  while (board.MakeMove(rand() % 7, 'C') == false){}

  board.PrintBoard();

  cout << "Where would you like to make your next move?" << endl;

  cin >> choice;

  board.MakeMove(choice,'H');

  while (board.MakeMove(choice,'H') == false){

  cin >> choice;

  }

  counter++;

  }

 

  if (board.CheckWin('C')){

  cout << "Computer Wins!" << endl;}

  else if (counter == 21){cout << "Tie Game!" << endl;}

  else {cout << "Human Wins!" << endl;}

  board.PrintBoard();

}

4 0
3 years ago
Other questions:
  • NO reacts with Br2 in the gas phase according to the following chemical equation: 2NO(g) +Br2(g)2NOBr(g) It is observed that, wh
    6·1 answer
  • How many types of engineering specialist are there?
    14·1 answer
  • Air is to be heated steadily by an 8-kW electric resistance heater as it flows through an insulated duct. If the air enters at 5
    10·1 answer
  • What are the 5 major forest types?
    5·2 answers
  • How many trains have been invented all around the world?
    14·1 answer
  • I need help to convert 23.5 million nanometers to millimeters
    15·2 answers
  • Which type of engineer often works with radar, communication, and navigation systems? electrical engineer chemical engineer indu
    7·1 answer
  • While reflecting on the solutions and the process of concept generation, the development team takes a look at some critical ques
    10·1 answer
  • The driver should be able to see the ground within _____ to the front?
    14·1 answer
  • In an ungrounded electrical systems with conductors installed in grounded metal raceways and enclosures, what is the voltage fro
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!