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
SpyIntel [72]
3 years ago
12

What will the following segment of code output if 11 is entered at the keyboard? int number; cin >> number; if (number &gt

; 0) cout << "C++"; else cout << "Soccer"; cout << " is "; cout << "fun" << endl; 1. C++ is fun 2. Soccer is fun 3. C++ 4. C++fun 5. Soccerfun
Computers and Technology
1 answer:
galina1969 [7]3 years ago
5 0

Answer:

1. C++ is fun

Explanation:

Writing the code more clear:

int number;

cin >> number;

if (number > 0)

          cout << "C++";

else

          cout << "Soccer";

cout << " is ";

cout << "fun" << endl;

On the IF line, the conditional expression is evaluated TRUE (11 > 0), so the string "C++" is printed.

Then, the ELSE sentence is not executed since the expression has been already evaluated as TRUE.

Notice there are no additional brackets, so only the line cout << "Soccer"; is considered inside the ELSE.

The two remaining lines are executed always.

The final result is:

C++  is fun

You might be interested in
A local reaction will occur at the site of the exposure, such as irritations or damage to the skin, eyes or lungs true or flase
nadezda [96]
True 

Hope that helps.

(:

5 0
3 years ago
You would like to see only the last 15 lines of /home/user/log file on your linux machine. Which command line interface (cli) co
BARSIC [14]

In Linux computer systems, "tail -n 15 /home/user/logfile" is a command line interface (cli) command that should be used to view only the last 15 lines of /home/user/log file.

<h3>What is a Linux command?</h3>

A Linux command can be defined as a software program that is designed and developed to run on the command line, in order to enable an administrator (end user) of a Linux network perform both basic and advanced tasks by entering a line of text.

In Linux computer systems or machines, a command line interface (cli) command that should be used by an administrator (end user) to view only the last 15 lines of /home/user/log file is "tail -n 15 /home/user/logfile."

In conclusion, the above command would reveal only the last 15 lines of /home/user/log file on a Linux computer system.

Read more on Linux commands here: brainly.com/question/25480553

#SPJ1

3 0
2 years ago
To help determine which technology to use, Raul creates a table to help him compare the pros and cons of his choices. What part
love history [14]

The answer is analyzing choices/options

Analyzing choices/options is one of the several steps of the decision making processes. Analyzing your choices will help you determine how your final decisions will impact yourself and everyone else around you. It is in this step that you will be asking yourself the likelihood of the results of your decisions now and in the future. In addition, this step will help you review the pros and cons of your choices listed in the previous steps.

5 0
3 years ago
Update thejavafile names to include your initials at the end, send .java file only.1. Completein-place heapSort, which takes an
Sladkaya [172]

Answer:

Yes

Explanation:

Because you send it to the java file and the java file is only one single (1)

3 0
3 years ago
The following statement calls a function named half, which returns a value that is half
nadezda [96]

Answer:

function half(number) {

     let result = number/2;

     return result;

}

Explanation:

4 0
3 years ago
Other questions:
  • Candace opened an email from a person she didn't know and clicked on a pop-up in the email that installed a virus on her compute
    8·2 answers
  • Variables used for output are associated with what controls on a form?​
    5·1 answer
  • Effective display designs must provide all the necessary data in the proper sequence to carry out the task. Identify a recent pe
    12·1 answer
  • Which of these is an online presentation tool?
    9·2 answers
  • A computer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a ser
    9·1 answer
  • What<br>are<br>the features of secondary storage media​
    13·2 answers
  • What are the words that make up a high-level programming language called?
    6·1 answer
  • A human subject’s photographs show two catchlights in each eye that are unwanted by the photographer. What is the most likely ca
    12·1 answer
  • I only put one answer and didn’t specify what it answered
    14·2 answers
  • assuming the default gateway is connected to the internet, what type of internet access would this server have?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!