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
Because some countries have poor traditional telephone services, companies and consumers have resorted to Group of answer choice
maw [93]

Answer:

a. leap frogging

Question:

Because some countries have poor traditional telephone services, companies and consumers have resorted to Group of answer choices leap frogging. express package services. satellite telephones. fiber-optic telephones. voice over internet protocol (VOIP) services.

3 0
3 years ago
Whenever I try to take a picture of a question on brainly it says “oops something went wrong try again in a while”. Is anybody h
yuradex [85]

Answer:

yes I am having the same problem I take a picture and it says something is wrong with connection

8 0
3 years ago
Read 2 more answers
Which correctly shows the configuration of boxes in the View tab that allow the indents to be changed?
den301095 [7]
The correct answer is B. Got it right on my review
4 0
3 years ago
Suppose we want to design a combinational logic block that accepts a 4 bit Binary number as input. Let the most significant bit(
labwork [276]

Answer:

I'm sorry I'd been looking at this question a while and I can't seen to figure it out.

3 0
3 years ago
Music = ("rap", "hip hop", "gospel")
astraxan [27]
Music = (“rap”, “hip hop”, “gospel”)
Country = (“country”,) #make sure that comma is outside of quotes
New_music = music + Country
print(New_music)
#var can be whatever you want
output:
(“rap”, “hip hop”, “gospel”, “country”)
4 0
3 years ago
Other questions:
  • Once Raul selects a technology solution, he has completed the process. <br> a. True<br> b. False
    13·2 answers
  • Which web browser below is natively available on a major operating system? ie 10 opera firefox chrome?
    12·1 answer
  • What is the term used for the document that describes the scenes and sequence of a game?
    6·1 answer
  • What would happen to a eukaryotic cell if all its mitochondriawere destroyed
    7·1 answer
  • How to change screen brightness windows 10?
    7·1 answer
  • 1⁰=?<br> Is equal to...........
    12·2 answers
  • You have a small company and want to keep your costs low, but it is important your employees share data. Which network would pro
    5·2 answers
  • The command-line interface tells a user that it's ready to receive commands by displaying a specific set of characters called a(
    12·1 answer
  • Describe how being a global citizen in the world of advanced technology can be beneficial to your success in meeting your person
    13·1 answer
  • Which feature helps an edit-test-bug cycle work faster in the python programming language?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!