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
MrRa [10]
3 years ago
11

What is wrong with this?

Computers and Technology
1 answer:
nalin [4]3 years ago
3 0

Answer:

missing bracket

Explanation:

Notice that the "body" block has an opening bracket, but no closing bracket. Instead, the "p" block starts before the "body" block has closed. The "body" block is missing a bracket.

You might be interested in
Monster Collector
Lera25 [3.4K]

Answer:

In java:

import java.util.*;

public class Main{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int monsternum, usernum;

 int count = 0;

 Random rand = new Random();

 String [] monsters = {"wild pikamoo","wild bulbaroar"};

 for(int i =0;i<2;i++){

     monsternum = rand.nextInt(5);  

     System.out.print("A "+monsters[i]+" appears! Guess a number between 1 and 5: ");

     usernum = input.nextInt();

     if(monsternum == usernum){      count++;      System.out.println("Congratulations, you caught a "+monsters[i]+"!");  }

 else{      System.out.println("You almost had it, but the monster escaped.");  }

 

 }

 System.out.println("There are no more monsters to encounter!");

 System.out.println("You caught "+count+" monsters of 2");

 if(count!=2){      System.out.print("Keep training to be the very best!");  }

 else{      System.out.print("You're the monster collector master!");  }

}

}

Explanation:

This declares monster and user number as integers

 int monsternum, usernum;

Initialize count to 0

 int count = 0;

Call the random object

 Random rand = new Random();

Create a string array to save the monster names

 String [] monsters = {"wild pikamoo","wild bulbaroar"};

Iterate for the 2 monsters

 for(int i =0;i<2;i++){

Generate a monster number

     monsternum = rand.nextInt(5);  

Prompt the user to take a guess

     System.out.print("A "+monsters[i]+" appears! Guess a number between 1 and 5: ");

Get user guess

     usernum = input.nextInt();

If monster number and user guess are equal, congratulate the user and increase count by 1

<em>      if(monsternum == usernum){      count++;      System.out.println("Congratulations, you caught a "+monsters[i]+"!");  } </em>

If otherwise, prompt the user to keep trying

<em>  else{      System.out.println("You almost had it, but the monster escaped.");  }  </em>

<em>  } </em>

Print no monsters again

 System.out.println("There are no more monsters to encounter!");

Print number of monsters caught

 System.out.println("You caught "+count+" monsters of 2");

Print user score

<em>  if(count!=2){      System.out.print("Keep training to be the very best!");  } </em>

<em>  else{      System.out.print("You're the monster collector master!");  } </em>

5 0
3 years ago
Just answer the 2 questions. THX
pogonyaev

Answer:

A then D

Explanation:

3 0
3 years ago
Dora electronically transferred $591.68 from her checking account to Matt's checking account. In what column of the check regist
Allisa [31]
The answer is D.Payment/Debit
4 0
3 years ago
Read 2 more answers
Along a road lies a odd number of stones placed at intervals of 10 metres. These stones have to be assembled around the middle s
nikitadnepr [17]

Answer:

hope this helped you,(ㆁωㆁ)

3 0
4 years ago
What is the maximum amount that OSHA can impose as a penalty on an employer for each Willful violation?
RSB [31]
To be honest bro, i really don't know the answer
7 0
4 years ago
Other questions:
  • Which model is the oldest and most common technique of differentiating information systems?
    8·2 answers
  • Which social network site has 1.5 billion actives users per month?
    15·1 answer
  • What is the most significant issue that needs to be addressed when ensuring the proper functioning of a computer?
    7·1 answer
  • Q13. On which option do you click to
    12·1 answer
  • To uncompress the data back into its original binary state, you simply reverse the process. This technique is an example of what
    7·1 answer
  • Write a python program to print numbers from 100 to 50 using for loop.<br> I NEED THIS URGENT PLEASE
    9·1 answer
  • What are the five Ws?<br> (I don’t even know what this means)
    5·2 answers
  • What is 11100111 to decimal form?
    9·2 answers
  • (I'm confused, might as well ask for help)
    8·2 answers
  • quizlet ann is a security professional for a midsize business and typically handles log analysis and security monitoring tasks f
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!