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
What does it mean when your phone says system ui has stopped?
wel
It means hat the CPU is taking o much of what the phone can normally do try delete some apps or close apps your not using 
8 0
4 years ago
What can be designed to create annoying glitches or destroy data
Katen [24]

I guess the best answer is Virus.

Virus is a malicious computer program that is designed to create annoying glitches or destroy data.

3 0
3 years ago
Read 2 more answers
____ elements are arranged to show which tasks must be completed before subsequent dependent tasks can begin.
Masteriza [31]
The answer is Gantt Chart
5 0
4 years ago
Identify the subject: Computer graphics are amazing these days.
Shtirlitz [24]
B.................................
3 0
4 years ago
Read 2 more answers
Transcription in a virus that has an rna genome is complex because __________.
AnnZ [28]
I had to look for the options and here is my answer:

Transcription in a virus that contains an RNA genome is complicated due to the following reasons: the virus has to create a DNA intermediate, the viral genome needs to encode for RNA-dependent RNA polymerase, and lastly, the virus needs to have its own <span>RNA-dependent RNA polymerase.</span>
8 0
3 years ago
Other questions:
  • Which of the following best describes a computer virus? another name for a software bug the product of a computer crash software
    10·2 answers
  • Why does hamlet want to kill himself and what stops him from doing that?
    10·1 answer
  • U2- an example of __________ is an attempt by an unauthorized user to gain access to a system by posing as an authorized user.
    6·1 answer
  • There are two different perspectives in terms of how programs are delivered for different ethnic groups. If an agency offers dif
    14·1 answer
  • Explain Software licensing
    12·1 answer
  • Zahra's softball team needs money for team T-shirts. The coach makes some fundraising suggestions, while team members brainstorm
    5·2 answers
  • What is a header row?
    8·1 answer
  • How do you print "Hello World" in the console with Python? Wrong Answers Only.
    7·2 answers
  • Which type of vulnerability scan mimics the work of a threat actor who has already exploited a vulnerability and compromised cre
    5·1 answer
  • Why might you use the More button in the Find and Replace dialog box?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!