answer.
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
Mnenie [13.5K]
2 years ago
7

Two blue armies are each poised on opposite hills preparing to attack a single red army in the valley. The red army can defeat e

ither of the blue armies separately but will fail to defeat both blue armies if they attack simultaneously. The blue armies communicate via an unreliable communications system (a foot soldier). The commander with one of the blue armies would like to attack at noon. His problem is this: If he sends a message to the other blue army, ordering the attack, he cannot be sure it will get through. He could ask for acknowledgement, but that might not get through. Is there a protocol that the two blue armies can use to avoid defeat?
Computers and Technology
2 answers:
labwork [276]2 years ago
6 0

Answer:

I would attack with one blue army and while all the chaos I would send the foot soldier to the second blue army and tell them to attack with the first. Idk like if the foot soldier is the only way of communication, so yeah

ivanzaharov [21]2 years ago
4 0

Answer:

Yes there is...

Explanation:

Since the Red army can defeat both blue army simultaneously, one part of the blue army should proceed with the attack at noon thereby sending the message to the other blue army using the confrontation or attack as the signal. Possibly while the confrontation will be on, the other blue army will join force.

You might be interested in
Write a class with a constructor that accepts a String object as its argument. The class should have a method that returns the n
mote1985 [20]

Answer:

import java.util.Scanner;

public class VowelsAndConsonantsDemo {

   /**

   The printMenu methods displays a menu to the user

    */

   public static void printMenu() {

       System.out.println("Please select an option: ");

       System.out.println();

       System.out.print("a. Count the number of vowels in the string.\n"

               + "b. Count the number of consonants in the string.\n"

               + "c. Count both the vowels and consonants in the string.\n"

               + "d. Enter another string.\n"

               + "e. Exit the program\n");

   }

   public static void main(String[] args) {

       String input;      // to hold the user's input

       String option;     // to hold the user's input

       char choice;       // to hold a single character

       char exit;         // user chooses 'e' to exit the program

       char letter;       //the Y or N from the user's decision to exit

       // create a Scanner object to read keyboard input.

       //  Scanner keyboard = new Scanner(System.in);

       Scanner keyboard;

       do {

           keyboard = new Scanner(System.in);

           // ask user to enter string

           System.out.print("Enter a string: ");

           input = keyboard.nextLine();

           input = input.toLowerCase();

           System.out.println();

           printMenu();

           option = keyboard.nextLine();

           choice = option.charAt(0);

           VowelsAndConsonants words = new VowelsAndConsonants(input);

           switch (choice) {

               case 'a':

               case 'A':

                   System.out.println("Number of Vowels: " + words.getVowels());

                   break;

               case 'b':

               case 'B':

                   System.out.println("Number of Consonants: " + words.getConsonants());

                   break;

               case 'c':

               case 'C':

                   System.out.println("Number of Vowels & Consonants: " + words.getConsonants()

                           + words.getVowels());

                   break;

               case 'd':

               case 'D':

                   System.out.println("Enter a string: ");

                   break;

               case 'e':

               case 'E':

                   System.exit(0);

                   break;

               default:

                   System.out.println("You did not enter a valid choice.");

           }

           //

           // keyboard.nextLine();    //consumes the new line character after the choice

           // String answer = keyboard.nextLine();

           // letter = answer.charAt(0);

       } while (true);

   }

}

4 0
1 year ago
Assign decoded_tweet with user_tweet, replacing any occurrence of 'TTYL' with 'talk to you later'. Sample output with input: 'Go
nekit [7.7K]

Answer:

I am going to use the Python programming language to answer this. The source code is given below:

print("Enter your tweet here")

user_tweet = input()

decoded_tweet = user_tweet.replace('TTYL', 'talk to you later')

print("This is the decoded tweet: ")

print(decoded_tweet)

Explanation:

In the program the replace() module was used to replace 'TTYL' with 'talk to you later.'

Attached is the screenshot of the output.

8 0
2 years ago
Read 2 more answers
Frequency of failure and network recovery time after a failure are measures of the _______ of a network.
coldgirl [10]
Frequency of a failure and network recovery time after a failure are measures of the Reliability of a network
8 0
1 year ago
Write code that uses the input string stream inss to read input data from string userinput, and updates variables usermonth, use
mr Goodwill [35]

Answer:

It will be a java code.

Explanation:

import java.util.Scanner;

public class StringInputStream {

    public static void main (String [] args) {

        Scanner inSS = null;

        String userInput = "Jan 12 1992";

        inSS = new Scanner(userInput);`

        String userMonth = "";

        int userDate = 0;

        int userYear = 0;

        /* Your solution goes here  */

        System.out.println("Month: " + userMonth);

        System.out.println("Date: " + userDate);

        System.out.println("Year: " + userYear);

        return;

   }

}

3 0
2 years ago
Read 2 more answers
An expression containing the operator && is true either or both of its operands are true. True/False
Luba_88 [7]

Answer:

True.

Explanation:

An expression containing the && and  operator is only true if both of the operands present in the expression are true otherwise it will give the result as false if either one of them is false or both of them are false.In the question it states that the expression in true either or both of it's operand are true.

Hence the answer is true.

4 0
1 year ago
Other questions:
  • Whoever helps me with these questions i will help them with the same number of questions in any subject: 1. As the operations ma
    14·1 answer
  • Write the definition of a function dashedline, with one parameter , an int . if the parameter is negative or zero, the function
    15·1 answer
  • Social networking sites like Office Online, PayPal, and Dropbox are used to develop social and business contacts.
    6·2 answers
  • A(n) ______close to a cover letter leads to more interviews because you are contacting the employer. a. passive b. lengthy c. ac
    11·2 answers
  • Read first a user's given name followed by the user's age from standard input. Then use an ofstream object named outdata to writ
    6·1 answer
  • Does the Boolean expression count > 0 and total / count > 0 contain a potential error? If so, what is it?
    8·1 answer
  • 1. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    7·1 answer
  • A mobile device user has tried to install a new app numerous times without success. She has closed all unused apps, disabled liv
    7·1 answer
  • Which are types of lines? Choose three answers.
    9·1 answer
  • A large number of genetic codes are stored as binary values in a list. Which one of the following conditions must be true in ord
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!