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
DochEvi [55]
3 years ago
5

2.13 LAB: Expression for calories burned during workout

Engineering
1 answer:
katrin [286]3 years ago
6 0

Answer:

ee

Explanation:

This is an over the top question

You might be interested in
Two small balls A and B with masses 2m and m respectively are released from rest at a height h above the ground. Neglecting air
statuscvo [17]

Answer:

The kinetic energy of A is twice the kinetic energy of B

Explanation:

5 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
Which career best fits the group of the words below? High voltage, lines
Llana [10]

Answer:

I forget the word for it, but probably the guys who set up the power lines in the city.

Explanation:

5 0
3 years ago
Read 2 more answers
What unit of measurment would be used to measure current?
Alex_Xolod [135]

Answer:

The S. I unit of current is Amphere

5 0
3 years ago
Technician A says a solenoid is not used on modern automobiles. Technician B says fuel injectors and starter motor solenoids are
julia-pushkina [17]

Answer:

ON THE BOTTOM

Explanation:

red cord plus black cord

5 0
3 years ago
Other questions:
  • Rain falls on a 1346 acre urban watershed at an intensity of 1.75 in/hr for a duration of 1 hour. The catchment land use is 20%
    10·1 answer
  • An air conditioner using refrigerant-134a as the working fluid and operating on the ideal vapor-compression refrigeration cycle
    7·2 answers
  • Someone has suggested that the air-standard Otto cycle is more accurate if the two polytropic processes are replaced with isentr
    10·1 answer
  • Is there a way to get the answers to a NCCER book test?
    7·1 answer
  • A chemistry student accidentally drops a large mercury thermometer and it breaks. The thermometer contained 2 grams of mercury (
    13·1 answer
  • A continuous random variable, X, whose probability density function is given by f(x) = ( λe−λx , if x ≥ 0 0, otherwise is said t
    12·1 answer
  • Match the scenario to the related government program.
    8·1 answer
  • Three 1.83 in. diameter bolts are used to connect the axial member to the support in a double shear connection. The ultimate she
    8·1 answer
  • Tech A says you can find the typical angle of a V-block engine by dividing the number of cylinders by 720
    11·1 answer
  • 6.3. A __________ is used to indicate the base material that needs to be beveled.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!