Question

In: Computer Science

C++please add menu choice on main.cpp with these function below. output : Hello! let's play a...

C++please add menu choice on main.cpp with these function below.

output :

Hello! let's play a game

a.Exit

b.Set Player's Names

c.Play in 2 Player Mode

d.Play in 1 Player Mode (vs. Computer)


//////////////////HEADER //////////////////////

#ifndef MYHEADER_H_
#define MYHEADER_H_
#include<iostream>
#include<iomanip>
#include<cstdlib>

using namespace std;

const int NUM_ROWS = 3;
const int NUM_COLS = 3;

int sum;

void OutputInstruct()
{
   cout << "\nPlay the game\n"<<endl;
}

/******************************************************************************
* InitBoard
* This function initializes each spot in the board to a space ' '.
* RETURNS: Board initialized with all spaces
*****************************************************************************/

void InitBoard(char board[][3]) // tic tac toe board – OUT
{
   for(int i = 0; i <= NUM_ROWS; i++)
       for(int j = 0; j <= 3; j++)
           board[i][j] = ' ';
}

/******************************************************************************
* DisplayBoard
* This function outputs the tic tac toe board including the tokens
* played in the proper format (as described below).

   1        2        3
1[1][1]. [1][2]. [1][3]
2[2][1]. [2][2]. [2][3]
3[3][1]. [3][2]. [3][3]

* RETURNS: nothing
* Outputs the current state of the board
*****************************************************************************/

void DisplayBoard(const char board[][3]) // tic tac toe board
{
   cout << setw(10) << "1" << setw(8) << "2" << setw(9) << "3\n";
   for (int i=0; i < 3; i++)
   {
       cout << setw(7)<< "[" << i+1 << "][1] | " << "[" << i+1;
       cout << "][2] | " << "[" << i+1 << "][3]" << endl;
       cout << setw(14)<< "|" << setw(9) << "|" << endl;

       for (int j = 0; j < 3; j++)
       {
           switch(j)
           {
               case 0: cout << i + 1 << setw(9) << board[i][j];
               cout << setw(4) << "|";
               break;

               case 1: cout << setw(4) << board[i][j];
               cout << setw(5) << "|";
               break;

               case 2: cout << setw(4) << board[i][j] << endl;
               break;

               default: cout <<"ERROR!\n\n";
           }
       }

       cout << setw(14)<< "|" << setw(10) << "|\n";
       if (i != 2)
       {
       cout << setw(32) << "--------------------------\n";
       }
   }
   cout << endl << endl;
}

/******************************************************************************
* GetPlayers
* This function prompts the user and gets the input for the players’ names.
* player1 contains the name of the player that is using the X token.
* player2 contains the name of the player that is using the O token.
*
* RETURNS: the token opposite of the one in which it receives.
*****************************************************************************/

void GetPlayers(string& player1, string& player2)
{
   cout << "\nEnter the name of player 1(X) : ";
   getline (cin, player1);
   cout << "Enter the name of player 2(O) : ";
   getline (cin, player2);
}

void GetAndCheckInp(char board[][3], char token, string player1, string player2)
{
   int row;
   int col;
   bool valid;

   do
   {
       if (token == 'X')
       {
           cout << player1 << "'s turn What's your play? : "<<endl;

           cout << "Row? : "<<endl;
           cin >> row;

           cout << "Column? : "<<endl;
           cin >> col;
       }

       else if (token == 'O')
       {
           cout << player2 << "'s turn: What's your play?"<<endl;

           cout << "Row? : "<<endl;
           cin >> row;

           cout << "Column? : "<<endl;
           cin >> col;
       }

       row--;
       col--;

       if ((row > NUM_ROWS || row < 0) || (col > 3 || col < 0))
       {
           valid = false;
           cout << "Please chose a space on the board." << endl;
       }

       else if (board[row][col] != ' ')
       {
           valid = false;
           cout << "That space is already taken, choose another"<<endl;
       }

       else
       {
           valid = true;
           board[row][col] = token;
           sum++;
       }

   } while (!valid);
}

/******************************************************************************
* SwitchToken
*
* RETURNS: the token opposite of the one in which it receives.
*****************************************************************************/

char SwitchToken(char token) // current player’s token ('X' or 'O') - IN
{
   if (toupper(token) == 'X')
   {
       token = 'O';
   }

   else if (toupper(token) == 'O')
   {
       token = 'X';
   }

   return token;
}

/******************************************************************************
* CheckWin
* This function checks to see if either player has won.
* RETURNS the character value of the player that won or T if it was a tie
* or N if no won
*****************************************************************************/

char CheckWin(const char board[][3]) // tic tac toe board - IN
{
   char win = ' ';

   // Checks for three same value horizental
   for (int i = 0; i < 3; i++)
       if (board[i][0] == board[i][1] && board[i][1] == board[i][2]) return board[i][0];

   // Checks for three same value vertical
   for (int i = 0; i < 3; i++)
       if (board[0][i] == board[1][i] && board[1][i] == board[2][i]) return board[0][i];

   // Checks for three same value diagnal
   if ((board[0][0] == board[1][1] && board[1][1] == board[2][2]) || (board[0][2] == board[1][1] && board[1][1] == board[2][0]))
       return board[1][1];

   // Checks if there is any square left
   for (int i = 0; i < 3; i++)
       for (int j = 0; j < 3; j++)
           if (board[i][j] == ' ')
               return ' ';

   // returns draw
   return 'T';
}

/******************************************************************************
* OutputWinner
*
* RETURNS: nothing
* Displays the winner’s name
*****************************************************************************/

void OutputWinner(char whoWon, string player1, string player2)
{
   if (whoWon == 'X')
   {
       cout << player1 << " has won the game"<<endl;
   }

   else if (whoWon == 'O')
   {
       cout << player2 << " has won the game"<<endl;;
   }

   else if (whoWon == 'T')
   {
       cout << player1 << " and " << player2 << " have tied"<<endl;;
   }
}

#endif

>>>>>>>>>>>>>Main program >>>>>>>>>>>>>>>>>>>>>>>

#include "myheader.h"

int main()
{
   const int NUM_ROWS = 3;
   const int NUM_COLS = 3;

   // Variables
   string player1;
   string player2;

   GetPlayers(player1, player2);

   bool again;

   do
   {
       // Variables
       bool won;
       char board[NUM_ROWS][NUM_COLS];
       char token;
       char input;

       won = false;
       again = true;

       InitBoard(board);
       OutputInstruct();

       token = 'O';

       while(!won)
       {
           token = SwitchToken(token);
           GetAndCheckInp(board, token, player1, player2);

           if (CheckWin(board) != ' ')
           {
               won = true;
           }

           DisplayBoard(board);
       }

       OutputWinner(CheckWin(board), player1, player2);

       //asking user to play again
       cout<<"\nPlay again? (Y/N) : ";
       cin>>input;

       again = toupper(input)=='Y';

   } while(again);

   return 0;
}

Solutions

Expert Solution

Screenshot

Program

myheader.h

#ifndef MYHEADER_H_
#define MYHEADER_H_
#include<iostream>
#include<iomanip>
#include<cstdlib>
#include<string>
using namespace std;

const int NUM_ROWS = 3;
const int NUM_COLS = 3;

int sum;

void OutputInstruct()
{
   cout << "\nPlay the game\n" << endl;
}

/******************************************************************************
* InitBoard
* This function initializes each spot in the board to a space ' '.
* RETURNS: Board initialized with all spaces
*****************************************************************************/

void InitBoard(char board[][3]) // tic tac toe board – OUT
{
   for (int i = 0; i <= NUM_ROWS; i++)
       for (int j = 0; j <= 3; j++)
           board[i][j] = ' ';
}

/******************************************************************************
* DisplayBoard
* This function outputs the tic tac toe board including the tokens
* played in the proper format (as described below).

   1        2        3
1[1][1]. [1][2]. [1][3]
2[2][1]. [2][2]. [2][3]
3[3][1]. [3][2]. [3][3]

* RETURNS: nothing
* Outputs the current state of the board
*****************************************************************************/

void DisplayBoard(const char board[][3]) // tic tac toe board
{
   cout << setw(10) << "1" << setw(8) << "2" << setw(9) << "3\n";
   for (int i = 0; i < 3; i++)
   {
       cout << setw(7) << "[" << i + 1 << "][1] | " << "[" << i + 1;
       cout << "][2] | " << "[" << i + 1 << "][3]" << endl;
       cout << setw(14) << "|" << setw(9) << "|" << endl;

       for (int j = 0; j < 3; j++)
       {
           switch (j)
           {
           case 0: cout << i + 1 << setw(9) << board[i][j];
               cout << setw(4) << "|";
               break;

           case 1: cout << setw(4) << board[i][j];
               cout << setw(5) << "|";
               break;

           case 2: cout << setw(4) << board[i][j] << endl;
               break;

           default: cout << "ERROR!\n\n";
           }
       }

       cout << setw(14) << "|" << setw(10) << "|\n";
       if (i != 2)
       {
           cout << setw(32) << "--------------------------\n";
       }
   }
   cout << endl << endl;
}

/******************************************************************************
* GetPlayers
* This function prompts the user and gets the input for the players’ names.
* player1 contains the name of the player that is using the X token.
* player2 contains the name of the player that is using the O token.
*
* RETURNS: the token opposite of the one in which it receives.
*****************************************************************************/

void GetPlayers(string& player1, string& player2)
{
   cin.ignore();
   cout << "\nEnter the name of player 1(X) : ";
   getline(cin, player1);
   cout << "Enter the name of player 2(O) : ";
   getline(cin, player2);
}

void GetAndCheckInp(char board[][3], char token, string player1, string player2)
{
   int row;
   int col;
   bool valid;
   if (player2 == "Computer") {
       do
       {
           if (token == 'X')
           {
               cout << player1 << "'s turn What's your play? : " << endl;

               cout << "Row? : " << endl;
               cin >> row;

               cout << "Column? : " << endl;
               cin >> col;
           }

           else if (token == 'O')
           {
               row = rand() % 3 + 1;
               col = rand() % 3 + 1;
           }

           row--;
           col--;

           if ((row > NUM_ROWS || row < 0) || (col > 3 || col < 0))
           {
               valid = false;
               cout << "Please chose a space on the board." << endl;
           }

           else if (board[row][col] != ' ')
           {
               valid = false;
               cout << "That space is already taken, choose another" << endl;
           }

           else
           {
               valid = true;
               board[row][col] = token;
               sum++;
           }

       } while (!valid);
   }
   else {
       do
       {
           if (token == 'X')
           {
               cout << player1 << "'s turn What's your play? : " << endl;

               cout << "Row? : " << endl;
               cin >> row;

               cout << "Column? : " << endl;
               cin >> col;
           }

           else if (token == 'O')
           {
               cout << player2 << "'s turn: What's your play?" << endl;

               cout << "Row? : " << endl;
               cin >> row;

               cout << "Column? : " << endl;
               cin >> col;
           }

           row--;
           col--;

           if ((row > NUM_ROWS || row < 0) || (col > 3 || col < 0))
           {
               valid = false;
               cout << "Please chose a space on the board." << endl;
           }

           else if (board[row][col] != ' ')
           {
               valid = false;
               cout << "That space is already taken, choose another" << endl;
           }

           else
           {
               valid = true;
               board[row][col] = token;
               sum++;
           }

       } while (!valid);
   }
}

/******************************************************************************
* SwitchToken
*
* RETURNS: the token opposite of the one in which it receives.
*****************************************************************************/

char SwitchToken(char token) // current player’s token ('X' or 'O') - IN
{
   if (toupper(token) == 'X')
   {
       token = 'O';
   }

   else if (toupper(token) == 'O')
   {
       token = 'X';
   }

   return token;
}

/******************************************************************************
* CheckWin
* This function checks to see if either player has won.
* RETURNS the character value of the player that won or T if it was a tie
* or N if no won
*****************************************************************************/

char CheckWin(const char board[][3]) // tic tac toe board - IN
{
   char win = ' ';

   // Checks for three same value horizental
   for (int i = 0; i < 3; i++)
       if (board[i][0] == board[i][1] && board[i][1] == board[i][2]) return board[i][0];

   // Checks for three same value vertical
   for (int i = 0; i < 3; i++)
       if (board[0][i] == board[1][i] && board[1][i] == board[2][i]) return board[0][i];

   // Checks for three same value diagnal
   if ((board[0][0] == board[1][1] && board[1][1] == board[2][2]) || (board[0][2] == board[1][1] && board[1][1] == board[2][0]))
       return board[1][1];

   // Checks if there is any square left
   for (int i = 0; i < 3; i++)
       for (int j = 0; j < 3; j++)
           if (board[i][j] == ' ')
               return ' ';

   // returns draw
   return 'T';
}

/******************************************************************************
* OutputWinner
*
* RETURNS: nothing
* Displays the winner’s name
*****************************************************************************/

void OutputWinner(char whoWon, string player1, string player2)
{
   if (whoWon == 'X')
   {
       cout << player1 << " has won the game" << endl;
   }

   else if (whoWon == 'O')
   {
       cout << player2 << " has won the game" << endl;;
   }

   else if (whoWon == 'T')
   {
       cout << player1 << " and " << player2 << " have tied" << endl;;
   }
}

#endif

main.cpp

#include "myheader.h"
//Function prototypes
char menu();
void twoPlayer(string player1, string player2);
void onePlayer(string player1);
int main()
{
   //Row and columns constants
   const int NUM_ROWS = 3;
   const int NUM_COLS = 3;

   // Variables
   string player1;
   string player2;
   char ch = menu();
   while (toupper(ch) != 'A') {
       if (toupper(ch) == 'B') {
           GetPlayers(player1, player2);
       }
       else if (toupper(ch) == 'C') {
           twoPlayer(player1, player2);
       }
       else if (toupper(ch) == 'D') {
           onePlayer(player1);
       }
       cout << endl;
       ch = menu();
   }
   return 0;
}
//Method to get menu return user choice
char menu() {
   char ch;
   cout<<"Hello!let's play a game\n"
       <<"a.Exit\nb.Set Player's Names\n"
       <<"c.Play in 2 Player Mode\nd.Play in 1 Player Mode(vs.Computer)"<<endl;
   cin >> ch;
   return ch;
}
//2 player function
void twoPlayer(string player1,string player2) {
   // Variables
   bool won;
   char board[NUM_ROWS][NUM_COLS];
   char token;
   char input;

   won = false;
   InitBoard(board);
   OutputInstruct();

   token = 'O';

   while (!won)
   {
       token = SwitchToken(token);
       GetAndCheckInp(board, token, player1, player2);

       if (CheckWin(board) != ' ')
       {
           won = true;
       }

       DisplayBoard(board);
   }

   OutputWinner(CheckWin(board), player1, player2);
}
//Single player game
void onePlayer(string player1) {
   // Variables
   bool won;
   char board[NUM_ROWS][NUM_COLS];
   char token;
   char input;

   won = false;
   InitBoard(board);
   OutputInstruct();

   token = 'O';

   while (!won)
   {
       token = SwitchToken(token);
       GetAndCheckInp(board, token, player1,"Computer");

       if (CheckWin(board) != ' ')
       {
           won = true;
       }

       DisplayBoard(board);
   }

   OutputWinner(CheckWin(board), player1, "Computer");
}

----------------------------------------------------------------------------------

Output

Hello!let's play a game
a.Exit
b.Set Player's Names
c.Play in 2 Player Mode
d.Play in 1 Player Mode(vs.Computer)
b

Enter the name of player 1(X) : Babila
Enter the name of player 2(O) : Michael

Hello!let's play a game
a.Exit
b.Set Player's Names
c.Play in 2 Player Mode
d.Play in 1 Player Mode(vs.Computer)
c

Play the game

Babila's turn What's your play? :
Row? :
1
Column? :
2
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2            |        |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |        |
             |        |


Michael's turn: What's your play?
Row? :
2
Column? :
1
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2        O   |        |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |        |
             |        |


Babila's turn What's your play? :
Row? :
1
Column? :
3
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |   X
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2        O   |        |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |        |
             |        |


Michael's turn: What's your play?
Row? :
2
Column? :
2
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |   X
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2        O   |   O    |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |        |
             |        |


Babila's turn What's your play? :
Row? :
2
Column? :
3
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |   X
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2        O   |   O    |   X
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |        |
             |        |


Michael's turn: What's your play?
Row? :
3
Column? :
1
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |   X
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2        O   |   O    |   X
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3        O   |        |
             |        |


Babila's turn What's your play? :
Row? :
3
Column? :
3
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |   X
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2        O   |   O    |   X
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3        O   |        |   X
             |        |


Babila has won the game

Hello!let's play a game
a.Exit
b.Set Player's Names
c.Play in 2 Player Mode
d.Play in 1 Player Mode(vs.Computer)
d

Play the game

Babila's turn What's your play? :
Row? :
1
Column? :
2
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2            |        |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |        |
             |        |


         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2            |        |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |        |   O
             |        |


Babila's turn What's your play? :
Row? :
2
Column? :
2
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2            |   X    |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |        |   O
             |        |


That space is already taken, choose another
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2            |   X    |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |   O    |   O
             |        |


Babila's turn What's your play? :
Row? :
3
Column? :
3
That space is already taken, choose another
Babila's turn What's your play? :
Row? :
1
Column? :
3
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1            |   X    |   X
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2            |   X    |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |   O    |   O
             |        |


         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1        O   |   X    |   X
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2            |   X    |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3            |   O    |   O
             |        |


Babila's turn What's your play? :
Row? :
3
Column? :
1
         1       2       3
      [1][1] | [1][2] | [1][3]
             |        |
1        O   |   X    |   X
             |        |
     --------------------------
      [2][1] | [2][2] | [2][3]
             |        |
2            |   X    |
             |        |
     --------------------------
      [3][1] | [3][2] | [3][3]
             |        |
3        X   |   O    |   O
             |        |


Babila has won the game

Hello!let's play a game
a.Exit
b.Set Player's Names
c.Play in 2 Player Mode
d.Play in 1 Player Mode(vs.Computer)
a


Related Solutions

provide a C code (only C please) that gives the output below: ************************************ *         Menu HW...
provide a C code (only C please) that gives the output below: ************************************ *         Menu HW #4 * * POLYNOMIAL OPERATIONS * * 1. Creating polynomials * * 2. Adding polynomials * * 3. Multiplying polynomials. * * 4. Displaying polynomials * * 5. Clearing polynomials. * * 6. Quit. * *********************************** Select the option (1 through 6): 7 You should not be in this class! ************************************* *         Menu HW #4 * * POLYNOMIAL OPERATIONS * * 1. Creating polynomials...
please use text only! Instructions Consider the provided C++ code in the main.cpp file: The function...
please use text only! Instructions Consider the provided C++ code in the main.cpp file: The function func2 has three parameters of type int, int, and double, say a, b, and c, respectively. Write the definition of func2 so that its action is as follows: Prompt the user to input two integers and store the numbers in a and b, respectively. If both of the numbers are nonzero: If a >= b, the value assigned to c is a to the...
Using C++ 1. Create a main function in a main.cpp file. The main function should look...
Using C++ 1. Create a main function in a main.cpp file. The main function should look as follows int main() {return 0;} 2. Create an array. 3. Ask user to enter numbers in size of your array. 4. Take the numbers and store them in your array. 5. Go through your array and add all the numbers. 6. Calculate the average of the numbers. 7. Display the numbers, sum and average.
Modify the original code and add an additional function of your choice. The function should be...
Modify the original code and add an additional function of your choice. The function should be unique and something you created for this assignment. Support your experimentation with screen captures of executing the new code. Prepare a test table with at least 3 distinct test cases listing input and expected output for your unique function. #include <stdio.h> void printHelp () { printf ("\n"); printf ("a: a(x) = x*x\n"); printf ("b: b(x) = x*x*x\n"); printf ("c: c(x) = x^2 + 2*x...
How would I add a quickSort function to the below C++ code to sort the randomly...
How would I add a quickSort function to the below C++ code to sort the randomly generated numbers? #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int i; int array[10]; int odd; int Max; int counter = 0; int main() { cout << "The 10 random elements are: "; cout << endl; srand ( time(0) ); for (int j = 0; j < 99; j++) { i = rand() % 100; if (i != i - 1) array[j] =...
MUST BE DONE IN C (NOT C++) In this task, using a function, we will add...
MUST BE DONE IN C (NOT C++) In this task, using a function, we will add a range of values of an array. The range will be determined by the user. For example, if I have the following array … 1.5 -5.6 8.9 4.6 7.8 995.1 45.1 -5964.2 … and the user tells me to add from the 3rd element to the 6th element, my program would add the values 8.9, 4.6, 7.8 and 995.1. To do so, please follow...
C++ Please create 4 different files with this respective names main.cpp , Pokemon.h , Pokemon.cpp Move.h...
C++ Please create 4 different files with this respective names main.cpp , Pokemon.h , Pokemon.cpp Move.h 16.5 Homework 5 Introduction Students will create a C++ program that simulates a Pokemon battle mainly with the usage of a while loop, classes, structs, functions, pass by reference and arrays. Students will be expected to create the player’s pokemon and enemy pokemon using object-oriented programming (OOP). Scenario You’ve been assigned the role of creating a Pokemon fight simulator between a player’s Pikachu and...
Write a C++ PROGRAM: Add the function min as an abstract function to the class arrayListType...
Write a C++ PROGRAM: Add the function min as an abstract function to the class arrayListType to return the smallest element of the list. Also, write the definition of the function min in the class unorderedArrayListType and write a program to test this function.
Hello, A summary of the article below I need a summary of the article below please....
Hello, A summary of the article below I need a summary of the article below please. Thank you As Coronavirus Surveillance Escalates, Personal Privacy Plummets Tracking entire populations to combat the pandemic now could open the doors to more invasive forms of government snooping later. In January, South Korea began posting detailed location histories about people who tested positive for the coronavirus, leading to public blaming and shaming.Credit...Woohae Cho for The New York Times By Natasha Singer and Choe Sang-Hun...
Please code the program showing the output below. using C language 1. Using 'if' or 'while'...
Please code the program showing the output below. using C language 1. Using 'if' or 'while' or 'for' and 'break' statement / only using <stdio.h> A bC dEf GhIj KlMnO 2. a program that identifies the largest number that can be expressed in short. Using only loop (ex.for,if,while) and break statement only using <stdio.h>
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT