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
Describe a situation in which a robot may have to avoid an obstacle without coming to a complete stop before turning.
Airida [17]

A robot may have to avoid an obstacle without coming to a complete stop before turning. If the robot is able to make a wide enough, long turn. instead of stopping, then turning sharply. For example if the robot were to come across an object and can sense said object before hand. it can then take action into turning before it is close enough.

3 0
3 years ago
Read 2 more answers
write a simple assembly code using 8088 microprocessor instruction set to add two numbers ? please help me if you know :(​
Kay [80]

Answer:

sexxxxx chaaaaat insta id abhilash0351

3 0
3 years ago
4. What is the formula for calculating the file size?
Verizon [17]
Step 2: Multiply total number of pixels by the bit depth of the detector (16 bit, 14 bit etc.) to get the total number of bits of data. Step 3: Dividing the total number of bits by 8 equals the file size in bytes. Step 4: Divide the number of bytes by 1024 to get the file size in kilobytes.
7 0
3 years ago
If your computer freezes on a regular basis and you checked your hard drive and you have insufficient space you've not installed
lina2011 [118]

First, check that your drivers are up to date. The lag could be caused by outdated drivers that are essential in running your system smoothly. New updates will fix bugs, known errors and will make programs work better and faster. Next, run your anti-virus software to check if malware, spyware, and adware that could be putting your computer at risk by installing hidden files, downloading stuff from the internet and uploading sensitive information from your computer. These unauthorized activities could be eating up your RAM in the background without you knowing and thus making your computer run slowly.

7 0
3 years ago
Read 2 more answers
What technical was the microscope invented in?
Ilia_Sergeevich [38]

Answer:

Two Dutch spectacle-makers and father-and-son team, Hans and Zacharias Janssen, create the first microscope in 1590.

Explanation:

A microscope is an instrument that makes an enlarged image of a small object, thus revealing details too small to be seen by the unaided eye. The most familiar kind of microscope is the optical microscope, which uses visible light focused through lenses. Eeuwenhoek observed animal and plant tissue, human sperm and blood cells, minerals, fossils, and many other things that had never been seen before on a microscopic scale. He presented his findings to the Royal Society in London, where Robert Hooke was also making remarkable discoveries with a microscope.

8 0
2 years ago
Other questions:
  • Want is the assignmment
    8·1 answer
  • What describes the basic transaction data such as its date, purpose, and amount and includes cash receipts, canceled checks, inv
    13·1 answer
  • "As a ____ database management system, Access is particularly powerful because you can enter data once and then retrieve informa
    6·1 answer
  • Insert a function in cell g5 to calculate the first student's monthly payment, using appropriate relative and absolute cell refe
    13·1 answer
  • To remove text from a specific location and keep it to use again, you should select ___
    6·1 answer
  • The template code provided is intended to check whether an integer entered by the user is outside of the range 20-29 (inclusive)
    9·1 answer
  • 11. Its collection of toys which could be used in the game via an implanted RFID chip made Activision’s game _______ one of the
    7·2 answers
  • Which of the following tools helps ensure your document will open in older versions of word
    13·1 answer
  • A central issue of public sharing is:
    13·2 answers
  • which is a correct procedural step for a webpage to render on a user's browser? an information request is sent to an ip address
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!