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
Most network behavior analysis system sensors can be deployed in __________ mode only, using the same connection methods as netw
soldier1979 [14.2K]
Most network behavior analysis system sensors can be deployed in passive mode only, using the same connection methods as network based idpss. Idps works as a network or host based systems. Most Nba sensors can be deployed in passive mode only too. The Nba examines the network traffic.
7 0
2 years ago
In order to organize your work effectively on the computer, where is the best place to save it?
Morgarella [4.7K]
Your answer is -

B. Folder Is the best place to save it
8 0
3 years ago
Read 2 more answers
Management information system by different outhors<br>​
morpeh [17]

Answer:

Explanation:

.....

...,....

8 0
2 years ago
The variable used in a loop to control the number of times it is executed is called a _______.
tia_tia [17]

Answer:

the variable used in a loop to control the number of timer is executed is called a interaction.

Explanation:

a particular way in which matter, fields, and atomic and subatomic particles affect one another

6 0
3 years ago
Que Inventos Importantes se Crearon durante la edad de agua y viento
ss7ja [257]

Answer:

Sep 24, 2016 · Que inventos importantes se crearon durante la edad del agua y el viento Recibe ahora mismo las respuestas que necesitas!

Explanation:

3 0
2 years ago
Other questions:
  • Directions Use your imagination and a word processor to write a business letter with two to three paragraphs. Your business lett
    5·1 answer
  • Edhesive silly questionsj
    8·1 answer
  • ________ is a password-cracking method wherein the attacker compares passwords to lists of common words.
    12·1 answer
  • Face book requires you to change your password regularly<br> a. TRUE<br> b. FALSE
    14·1 answer
  • Stealing passwords by using software code to run through various password schemes with numbers, symbols, capital letters, and ch
    6·1 answer
  • Which of the following actions is an example of "window dressing?" a. Using some of the firm’s cash to reduce long-term debt. b.
    13·1 answer
  • How do i move a file in python3
    10·1 answer
  • The domain in an email message tells you the
    9·2 answers
  • By
    7·1 answer
  • Are there any apps in the App Store that allow people to ask a question about any topic and have skilled professionals answer it
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!