Given code
#include
#include
using namespace std;
bool weHaveWinner(int a,int b)
{
return (a>=21 && b>=21 && abs(a-b)>1);
}
int main()
{
int aPoints = 0;
int bPoints = 0;
string input;

// ToDo: Write a loop until input is "end" or we have a winner
// the loop should read the input and add a point to aPoints if "A"
// or add a point to bPoints if "B", don't do anything but leave the
// loop if "end"

while(1)
{
cin >> input;
if(input=="end")
break;
if(input=="A")
aPoints++;
if(input=="B")
bPoints++;
if(weHaveWinner(aPoints,bPoints))
break;
}
// Tell the user if we have a winner or not
if(aPoints > bPoints + 1 && aPoints >= 21)
{
cout aPoints + 1 && bPoints >= 21)
{
cout << "Team B won! (" << aPoints << "-" << bPoints << ")" << endl;
}
else
{
cout << "Game ended as a draw. (" << aPoints << "-" << bPoints << ")" << endl;
}
return 0;
}

Given Code#include #include Using Namespace Std;bool WeHaveWinner(int A,int B){ Return (a&gt;=21 &amp;&amp;

Answers

Answer 1

Answer:

YES

Explanation:

Answer 2

Answer:

yeet

Explanation:

yeet


Related Questions

There are a multitude of items that Cyber Security professionals view as attack vectors but none are more prevalent and exploitable than application code or as readily available as the network perimeter. There are many ways that these areas are exploited. The application side has its beginning with code which is poorly designed from a security perspective. One of the code items that is exploited by fraudsters to pivot across an organization's internal network is the Web.cfg file - in this file non security minded programmers often leave the User ID and password for connecting to the associated database in plaintext.
For part one of this assignment, write a 1 page summary that explains to a non IT person what this attack is, how it works and how to prevent it.
The second part of this assignment is about the secure perimeter. Using your choice of reference for securing a network (NIST, Rainbow Series Red Book, Common Criteria etc.) research on how to design a secure network perimeter that will protect the internal applications, even poorly written ones like the one above from being exploited. Include a diagram of your solution and on the bottom half - a written explanation, in APA format, of your solution.

Answers

AnsweR

RRR

Explanation:

______________ helps you see how your document will appear on the paper. ​

Answers

Answer:

Print Preview

Explanation:

The "Print Preview" gives a person the idea on how his/her document will look like once it is printed out. Having an overview of the document will let you know whether you need to do some adjustments or edit some things before you actually print it.

There's a shortcut for this when it comes to the "Microsoft Word." All you have to do is to press ctrl + F2. Nevertheless, more modern computers don't need the print preview anymore since you can see the whole document on the actual print page.

Java Eclipse homework. I need help coding this

Project 5A - Mixed Results

package: proj5A
class: MixedResults

Create a new project called MixedResults with a class called Tester. Within the main method of Tester you will eventually printout the result of the following problems. However, you should first calculate by hand what you expect the answers to be. For example, in the parenthesis of the first problem, you should realize that strictly integer arithmetic is taking place that results in a value of 0 for the parenthesis.

double d1 = 37.9; //Initialize these variables at the top of your program
double d2 = 1004.128;
int i1 = 12;
int i2 = 18;

Problem 1: 57.2 * (i1 / i2) +1
Problem 2: 57.2 * ( (double)i1 / i2 ) + 1
Problem 3: 15 – i1 * ( d1 * 3) + 4
Problem 4: 15 – i1 * (int)( d1 * 3) + 4
Problem 5: 15 – i1 * ( (int)d1 * 3) + 4

Your printout should look like the following:

Problem 1: 1.0
Problem 2: 39.13333333333333
Problem 3: -1345.39999999999
Problem 4: -1337
Problem 5: -1313

Answers

Java clips homework I need help loading this create a new project called the mix results

What if were are not going to use our middle finger in typing the letters E And I what do you think will happen​

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

To use keyboard effectively and in a good way, there are guidelines that how put the fingers of the hand on the keyboard to use it properly. On the keyboard, there are two buttons, F and J, where you can put your first finger on it, the remaining three fingers on the remaining buttons on the same line of the keyboard.  

If you do not use the middle finger in typing the letter E and I, then you can not easily use the keyboard, because, the alignment of keeping fingers on the button becomes misplaced and you then get started typing wrong words. and it also becomes uncomfortable for you while using the keyboard in this way.

CNT Books has expanded considerably since you got the network up and running three years
ago. It now occupies an entire floor in the building, and its LAN has grown to include several
servers and more than 60 workstations.
CNT Books has recently purchased another book company and needs more space and
computers. Expansion plans include leasing another floor four stories above the current offices
in the same building and adding 35 workstations and at least one more server immediately,
with additional equipment purchases expected. [15 marks]
i. What type of network is called for—LAN, WAN, MAN, or internetwork?

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

CNT Books has expanded considerably since you got the network up and running three years  ago. It now occupies an entire floor in the building, and its LAN has grown to include several  servers and more than 60  workstations.

CNT Books has recently purchased another book company and needs more space and  computers. Expansion plans include leasing another floor four stories above the current offices  in the same building and adding 35 workstations and at least one more server immediately,  with additional equipment purchases expected.

The type of networking CNT Book will use is WAN.

LAN

A local area network (LAN) is a group of computers and peripheral devices that share a common communications line or wireless link to a server within a distinct geographic area. A local area network may serve as few as two or three users in a home-office or several hundred users in a corporation's central office

WAN

A wide area network (WAN) is a geographically distributed private telecommunications network that interconnects multiple local area networks (LANs). A LAN is a group of computers and network devices which are all connected to each other, typically from within a short relative geographical distance.

MAN

A metropolitan area network is a computer network that interconnects users with computer resources in a geographic region of the size of a metropolitan area.

internetworking

Internetworking is the process or technique of connecting different networks by using intermediary devices such as routers or gateway devices. Internetworking ensures data communication among networks owned and operated by different entities using a common data communication and the Internet Routing Protocol. internetworking is not a network type but it is a process or technique of connecting different networks by using intermediary devices.

Kiera decided to enroll in college because her friends told her it was a good idea and they wanted her to follow their lead. Kiera’s not sure about becoming a college student. Which statement has the most impact on Kiera’s family’s future?

Answers

(I could be wrong but)

Many more financial beneficial careers opportunities open with a college degree

Research the disadvantages of the computer and explain them.​

Answers

Answer:

Too much sitting-affects the back and makes our muscles tight

Carpal tunnel and eye strain-moving your hand from your keyboard to a mouse and typing are all repetitive and can cause injuries

Short attention span and too much multitasking-As you use a computer and the Internet and get immediate answers to your questions and requests, you become accustomed to getting that quick dopamine fix. You can become easily frustrated when something doesn't work or is not answered in a timely matter.

To follow the Principle of Least Privilege, Set-UID programs often permanently relinquish their root privileges if such privileges are not needed anymore. Moreover, sometimes, the program needs to hand over its control to the user; in this case, root privileges must be revoked. The setuid() system call can be used to revoke the privileges. According to the manual, "setuid() sets the effective user ID of the calling process. If the effective UID of the caller is root, the real UID and saved set-user-ID are also set". Therefore, if a Set-UID program with effective UID 0 calls setuid(n), the process will become a normal process, with all its UIDs being set to n. When revoking the privilege, one of the common mistakes is capability leaking. The process may have gained some privileged capabilities when it was still privileged; when the privileged is downgraded, if the program does not clean up those capabilities, they may still be accessible by the non-privileged process. In other words, although the effective user ID of the process becomes non-privileged, the process is still privileged because it possesses privileged capabilities. Compile the following program, change its owner to root, and make it a Set-UID program. Run the program as a normal user, and describe what you have observed. Will the file /etc/zzz be modified? Please explain your observation.

Answers

SOCRACTIC WOULD DEFINITELY HELP WITH THIS QUESTION HAVE YOU EVER HEARD OF IT !

20. The time for the disk arm to move the heads to the cylinder containing count
the desired sector is called

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The answer is the seek time.

The seek time is the time for the disk arm to move the heads to the cylinder containing the desired sector.

reasons why a computer system is said to be more intelligent than human brain ​

Answers

Answer:

smarter than humans. but feel less than humans

It’s not smarter than human brain but it’s faster than human brain and can store more memory than human and can do multiple works at same time

Why is it important to explore an Integrated
Development Environment?
A. To learn more about the syntax of Java
B. To learn more about the features of the environment
C. To learn more about error handling
D. To learn more about abstractions

Answers

Answer:

The answer to this question is given below in the explanation section. The correct answer is B.

Explanation:

The purpose behind to explore an integrated development environment is to learn more about the features of the environment.

So the correct answer is B.

For example, you can use visual studio to build asp.net application using c#, then you need to explore what features visual studio offering to you.

However, other options are incorrect. Because, you can learn more about syntax, error handling, and abstraction in the programming language, not in the IDE.

A script meaning sound effects

Answers

You write sound effects in a screenplay by capitalizing the sound your making in the action line of the script. For example “Jackie SLAMS the door shut.” or “The tires SCREECHES across the street.”

Which three skills are useful for success in any career?

Answers

Answer:

Problem solving.

Teamwork. ...

Initiative. ...

Analytical, quantitative. ...

Professionalism, work ethic. ...

Leadership. ...

Detail oriented.

Answer: Multitasking Skills, Resource- Management Skills, Time-Management Skills

Explanation: Got it correct!

Which step is first in changing the proofing language of an entire document?

Answers

Select the whole document by pressing Ctrl+a.

Answer:

A) Click the Language button on the Status bar

Explanation:

After you do this proceed to find the language you want to change the proofing to.

Programming Project: N-Queens Prerequisites: Chapter 5 For this project you will create a class that solves a variation of the 8-Queens Problem, the N-Queens Problem. If you need a recap of the 8-Queens Problem watch this video. The N-Queens Problem is identical to the 8-Queens Problem except we vary the size of the board. So, we can find the placement of queens on a 4x4 board (the 4-Queens Problem) or a 9x9 board (the 9-Queens Problem), etc. Your solution to the N-Queens Problem will be implemented entirely in the class ChessBoard which will at minimum include:

Answers

Socractic Would Definitely Help With An Answer Like This

Consider the following class declaration: public class Square { private double sideLength; public double getArea() { return sideLength * sideLength; } public double getSideLength() { return sideLength; } } Assuming that a no-arg constructor already exists, write an overloaded constructor for this class. It should accept an argument that is copied into the sideLength field. The parameter’s name is s.

Answers

Answer:

Here is the constructor:

public Square(double s) {  //constructor name is same as class name

sideLength = s;  } //s copied into sideLength field

Explanation:

The above constructor is a parameterized constructor which takes a double type variable s as argument. The name of constructor is same as the name of class.This constructor requires one parameters. This means that all declarations of Square objects must pass one argument to the Square() constructor as constructor Square() is called based on the number and types of the arguments passed and the argument passed should be one and of type double.

Here is where the constructor fits:

public class Square {

private double sideLength;

public Square(double s) {  

sideLength = s;  }

public double getArea() {

return sideLength * sideLength;}

public double getSideLength() {

return sideLength; } }

Which option provides an easy ability to label documents that can then be used as the basis for a document search?
author
title
tags
modified

Answers

The option which provides an easy ability to label documents that can then be used as the basis for a document search is referred to as: B. title.

A document can be defined as a computer resource that enable end users to easily store data as a single unit on a computer storage device.

Generally, all computer documents can be identified by a title, size, date modified, and type such as;

SystemTextAudioImageVideo

A title is a feature that avail end users the ability to easily label a document, as well as serve as the basis for a document search on a computer. For example, "My list" is a title and it can be used to search for a document on a computer.

Read more on document here: https://brainly.com/question/24849072

Answer:

B: Title

Explanation: Edge 2023

Kim wants to add a new tab on the ribbon named “Paste as Pictures” for a group of special commands. Put the steps in the correct order to explain how she can accomplish this task.

Step 1: Go to the Backstage view.

Step 2: Select Customize Ribbon.

Step 3: After a dialog box opens, navigate to the right side.

Step 4:

Step 5:

Step 6: Then, click OK.

Answers

✔ Click Options.

✔ Click New tab.

✔ Click Rename.

✔ Type a name.

Which type of network involves buildings in multiple cities connecting to each other?

Answers

Answer:

Power lines

Explanation:

Because their everywhere

Answer:

WAN

Explanation:

A network consisting of multiple LANs in

separate locations.

A company with LANs in three major cities, all

connected through WAN links, usually leased from a

telecommunications provider

Gloria is adding footers to a PowerPoint template for students to use in a literature class. Each student must choose an author and make a presentation about their life and work. She wants the first slide in each presentation to show only the author’s name and photo. On subsequent slides, she wants to include a footer with a date and time that changes depending on the actual date of each presentation.

After selecting the Slide Master view, how should Gloria proceed?

She should select
.

Next, she should select
.

Then, she should select
.

Finally, she should make changes in the
.

Answers

Answer:

✔ the Slide Master thumbnail

✔ the Insert tab

✔ Header & Footer

✔ Slide tab in the dialog box

Explanation:

On edg

The Slide Master thumbnail, the Insert tab and Header & Footer and  Slide tab in the dialog box.

What is Dialog box?

A dialog box, often known as a dialog or a conversation box, is a typical form of window in an operating system's graphical user interface (GUI).

In addition to displaying more details, the dialog box also prompts the user for input.

For instance, you interact with the "File Open" dialog box when you want to open a file while using a software. The Properties dialog box appears in Microsoft Windows when you right-click a file and select Properties.

A dialog box, often known as a dialog or a conversation box, is a typical form of window in an operating system's graphical user interface (GUI). In addition to displaying more details, the dialog box also prompts the user for input.

Therefore, The Slide Master thumbnail, the Insert tab and Header & Footer and  Slide tab in the dialog box.

To learn more about Software, refer to the link:

https://brainly.com/question/985406

#SPJ3

Write a Java program that generates a random number between 0 and 50. Then, the program prompts for guesses until the user is correct, or has made 10 wrong guesses. After each guess, the program indicates whether the guess was too high, too low, or correct. Once the round has ended, either by a correct guess or by using up the 10 guesses, the program displays the current status. Enter an integer number ( 0 to exit): 3241 3241 has 4 digits. Sum of digits of 3241 is 10. Enter an integer number ( 0 to exit): 264 264 has 3 digits. Sum of digits of 264 is 12. Enter an integer number ( 0 to exit): -12 -12 has 2 digits. Sum of digits of -12 is -3. Enter an integer number ( 0 to exit): 0 End. Enter a positive integer between 0 and 9: -3 Invalid input number. Enter a positive integer between 0 and 9: 15 Invalid input number. Enter a positive integer between 0 and 9: 5 0 !

Answers

Answer:

Here is the JAVA program:

import java.util.Scanner;  //to accept input from user

public class Main {   //class name

   public static void   GuessTheNumber()      {  //method to guess the number

       Scanner input = new Scanner(System.in);   //creates Scanner object to accept input from user

       int number = (int)(50 * Math.random()) ;   //generates random number from 0 to 50

       int trials = 10;  //allows 10 trials to user to guess the number

       int i, userGuess;  //stores user guess

       System.out.println("Guess a number between 0 to 50");  //prompts user to guess a number between 0 to 50  

       for (i = 0; i <trials; i++) {  //allows user to keep guessing in 10 trials

           System.out.println("Enter your guess: ");   //prompts user to enter a number as a guess

           userGuess = input.nextInt();  //reads users entered number(guess)

           if (number == userGuess) {  //if users guess is correct

               System.out.println("Congratulations! The guess is correct!");  //displays congratulatory message

               break;              }  //the loop breaks after correct guess is made

           else if (number>userGuess) {  //if user guess is less than correct number

               System.out.println("Too low");             }  

           else if (number<userGuess) {  //if user guess is greater than correct number

               System.out.println("Too high");            }          }    

       if (i == trials) {  //if user has made 10 wrong guesses

           System.out.println("You exceeded 10 trials!");

           System.out.println("The correct number was " + number);          }      } //displays the correct number if user made 10 wrong guesses

 

   public static void main(String arg[])      {     //start of main method

       GuessTheNumber();      }  } //calls method to start the guessing game

Explanation:

The program prompts the user to enter a guess and it uses random() method to generate randoms numbers from 0 to 50. The loop keeps iterating and prompting the user to enter a guess until the limit of number of trials exceeds. The trials are set to 10 so the user can guess a number in 10 tries. If the user guesses a number that is higher than the correct guess then the program indicates that the guess is too high by displaying a message "too high" and if user guesses a number that is lower than the correct guess then the program indicates that the guess is too low by displaying a message "too low". If user makes 10 wrong guess then the program displays the correct guess and ends. The screenshot of the output is attached.

differences between a small office and a big office​

Answers

the size and what’s in the office

Solve the recurrence relation.
S(1)=1
S(n)= S(n-1)+(2n-1) for n>=2

Answers

Answer:

hope that will help you

Write a program that prompts the user to enter: The cost of renting one room The number of rooms booked The number of days the rooms are booked The sales tax (as a percent). The program outputs: The cost of renting one room The discount on each room as a percent The number of rooms booked The number of days the rooms are booked The total cost of the rooms The sales tax The total billing amount. Your program must use appropriate named constants to store special values such as various discounts.

Answers

Answer:

Written in Python

cost = float(input("Cost of one room: "))

numrooms = int(input("Number of rooms: "))

days = int(input("Number of days: "))

salestax = float(input("Sales tax (%): "))

print("Cost of one room: "+str(cost))

print("Discount: 0%")

print("Number of rooms: "+str(numrooms))

print("Number of days: "+str(days))

totalcost = numrooms * cost

print("Total cost: "+str(totalcost))

salestax = salestax * totalcost/100

print("Sales tax: "+str(salestax))

print("Total Billing: "+str(salestax + totalcost))

Explanation:

The next four lines prompts user for inputs as stated in the question

cost = float(input("Cost of one room: "))

numrooms = int(input("Number of rooms: "))

days = int(input("Number of days: "))

salestax = float(input("Sales tax (%): "))

The following line prints cost of a room

print("Cost of one room: "+str(cost))

The following line prints the discount on each room (No information about discount; So, we assume it is 0%)

print("Discount: 0%")

The following line prints number of rooms

print("Number of rooms: "+str(numrooms))

The following line prints number of days

print("Number of days: "+str(days))

The following line calculates total cost of rooms

totalcost = numrooms * cost

The following line prints total cost

print("Total cost: "+str(totalcost))

The following line calculates sales tax

salestax = salestax * totalcost/100

The following line prints sales tax

print("Sales tax: "+str(salestax))

The following line calculates and prints total billings

print("Total Billing: "+str(salestax + totalcost))

Which option in the Caption dialog box configures whether the caption appears above or below the image?
Label
New Label
Position
Numbering

Answers

Answer:

label

jhguy

iiy767

jiuuyuihlk

njhuiyyhjjgiug

gugkjbkjhg

Answer:

Position

Explanation:

4.5 Code Practice
Write a loop that inputs words until the user enters STOP. After each input, the program should number each entry and print in this format:
(This code must be in python, also if a minor explanation can be added to the bottom that would be nice. But also long as u can help I will be fine)

Answers

i = 0

while True:

   user_input = input("Please enter the next word: ")

   if user_input == "STOP":

       break

   i += 1

   print("#{}: You entered {}".format(i,user_input))

print("All done. {} words entered.".format(i))

First we set i equal to zero so that we can keep track of how many words we input.

We set while True so that its a continuous loop until a certain condition is met to break out of the loop.

user_input is set equal to whatever word the user enters.

our if statement tells us to break out of the while loop if the user inputs "STOP"

If the user does not enter STOP i is set equal to itself plus 1. This just means we add one to i for every new word entered.

Then we print whichever word is entered.

After the while loop, we print All done and the quantity of words entered.  

Answer:

c = 0

word = input("Enter a word: ")

while word!="STOP":

   c = c+1

   print("#" + str(c) + ": You entered "+str(word))

   word = input("Please enter the next word: ")

print("All done. "+str(c)+" words entered.")

How can you get access to Help in Excel? Which of the following are correct ways to get to help?

1. F1
2.View Tab
3.Lightbulb
4.review tab
5.tell me what you want to do
6. the ? on the top-right corner in backstage view​

Answers

1. F1

3.Lightbulb

5.tell me what you want to do

6. the ? on the top-right corner in backstage view​

Answer:

1,3,5,6

Explanation:

Describe yourself as a programming object and give at least 5 properties and 5 methods that you think you are equipped with.

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

I consider myself a programming object, then the following are my properties and methods.

Properties (represents the features)

name.height.weight.skin color.eye color,hair style

Methods (represents the behavior)

Walk.Eat,ListenSpeakDrink

BRAINLIEST Which function will add a name to a list of baseball players in Python?


append()

main()

print()

sort()

Answers

Answer: Append()

Explanation:

Answer:

a append

Explanation:

Which function will add a name to a list of baseball players in Python?

what is digital footprint ?

Answers

Answer:

the information about a particular person that exists on the internet as a result of their online activities.

Answer:

Your digital footprint is what you do on the internet and what information you input. That is why it is important to never share information online

Explanation:

Other Questions
Find the equation of the lineY= __x + __ The group of points {(0, 1), (0,5), (2, 6), (3, 3)}is not a function, but the group of points {(1, 4),(2, 7), (3, 1), (5, 7)} is a function. What do younotice about the two groups of points? What doyou think it means to be a function? An x-box cost $230 but is discounted 28%. What is the new cost of the x-box? Explain the relationship between tissues and organs? Wardens are law enforcement officers given the authority to _____.hire additional law enforcement officers as neededdetermine the length of jail sentencesreport crimes to local police chiefschange local laws 6. In a free market economy, which social institution is most responsible for creatingjobs? What do the French compare the Micmac to,according to this passage?Europeansbeasts in the woodsthose with religion and manners During exercise, blood CO2 levels increase as a result of muscle cell activity. This makes blood more acidic, which disrupts pH homeostasis. Drag the following events in the regulation of gas exchange into the proper order. Identify each of the following stressors as eitheracute or chronicA interviewing for a jobB. living in an unsafe neighborhoodC planning for promD. taking a final exam Determine if the conclusion that follows from the given statements below is valid. If valid which law was used?1. if a number is a natural number then it is a whole number2. if a number is a whole number then it is an integerConclusion : if a number is a natural number then it is an integer Which term gives the horizontal length of one cycle of a periodic function?O amplitudeO periodO frequencyO phase shift Question 17 Multiple Choice Worth 3 points)(08.06 HC)Read and select the correct response to the question:Tous les jours je regarde les documentaires et aprs, les jeux. J'adore regarder les jeux le soir avant de manger. Je regarde les documentaires tous les jours parce que j'aime dcouvrir denouvelles choses. Mes documentaires prfrs sont sur les voyages dans le monde.Quelles sont ses missions favorites?Documentaries and GamesSport and GamesNews and GamesO Movies and Sport why is (4,1) not a solution to the equation y=3x+1 3 different numbers which are all equivalent to 10 Which of the statements below about buoyancy is true?A.if the buoyant force is greater than the force of gravity,the object will sink B.buoyancy is a force that acts on objects that are placed in a fluid C.all objects that experience the force of buoyancy floatD.buoyancy pushes objects down in the same direction as gravity (answer asap plz I will give brainliest to who helps me ) Need asap 9th grade just answer no explanation So It is all about math. I need help I need help pls!!!!!!!!!!!!!!!!!!!!!!!!!!1 Is there enough information given to prove that the following pairs of triangles are congruent explain why or why not if not describe the information could be added to guarantee congruence An object is traveling at a constant velocity of 10m/s for 4 seconds. What is its acceleration? 40 m/s/s0.4 m/s/s2.5 m/s/s0 m/s/s