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
beks73 [17]
2 years ago
7

You want to see both Michael and Meet Wally Sparks. If you purchase tickets for both

Engineering
1 answer:
Aleonysh [2.5K]2 years ago
6 0
$2.

Both tickets cost $1.50
$1.50 x 2 = $3
$5 - $3 = $2
You might be interested in
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
6) A deep underground cavern Contains 980 cuft
Elza [17]

Answer:

15625 moles of methane is present in this gas  deposit

Explanation:

As we know,

PV = nRT

P = Pressure = 230 psia = 1585.79 kPA

V = Volume = 980 cuft = 27750.5 Liters

n = number of moles

R = ideal gas constant = 8.315

T = Temperature = 150°F = 338.706 Kelvin

Substituting the given values, we get -

1585.79 kPA * 27750.5 Liters = n * 8.315 * 338.706 Kelvin

n = (1585.79*27750.5)/(8.315 * 338.706) = 15625

3 0
2 years ago
For a turbulent flow of a fluid in 0.6 m diameter pipe, the velocity 0.15 m from the wall is 2.7 m/s. Estimate the wall shear st
MAVERICK [17]

Answer:

If the turbulent velocity profile in a pipe of diameter 0.6 m may be approximated by u/U=(y/R)^(1/7), where u is in m/s and y is in m and 0.15 m from the pipe.

Explanation:

hope it helps

3 0
2 years ago
Calculate the current in the 8-W resistor of Figure below by using Thevenin’s theorem. What will be its value of connections of
kvv77 [185]

solution from c hegg. hope it helps. see photos explanation

7 0
3 years ago
What i s the value of a capacitor with 250 V applied and has 500 pC of charge? (a) 200 uF (b) 0.5 pF (c) 500 uF (d) 2 pF
exis [7]

Answer:

(d) 2 pF

Explanation: the charge on capacitor is given by the expression

Q=CV

where Q=charge

           C=capacitance

           V=voltage across the plate of the capacitor

here we have given Q=500 pF, V=250 volt

using this formula C=\frac{Q}{V}

=500×10^{-12}×\frac{1}{250}

=2×10^{-12}

=2 pF

3 0
3 years ago
Other questions:
  • The temperature of a flowing gas is to be measured with a thermocouple junction and wire stretched between two legs of a sting,
    8·1 answer
  • A man weighs 145 lb on earth.Part ASpecify his mass in slugs.Express your answer to three significant figures and include the ap
    11·1 answer
  • The mechanical properties of a metal may be improved by incorporating fine particles of its oxide. Given that the moduli of elas
    11·1 answer
  • Policy makers in the U.S. government have long tried to write laws that encourage growth in per capita real GDP. These laws typi
    6·1 answer
  • A 2-m3 rigid tank initially contains air at 100 kPa and 22°C. The tank is connected to a supply line through a valve. Air is flo
    14·1 answer
  • Fixed rate mortgage offer:
    9·2 answers
  • Discuss in detail the manners of interaction with opposite gender
    10·1 answer
  • Respond with TRUE if the symbol of the valve shown belows
    5·1 answer
  • We have a tube with a diameter of 5 inches that is 1 foot long. The tube then reduces the diameter to 3 inches. According to the
    8·2 answers
  • What is anthropology? Discuss the type of anthropology?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!