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
Veronika [31]
4 years ago
5

What will the following segment of code output? Assume the user enters a grade of 90 from the keyboard. cout << "Enter a t

est score: "; cin >> test_score;
Computers and Technology
1 answer:
inysia [295]4 years ago
5 0

Complete Question:

What will the following segment of code output?

Assume the user enters a grade of 90 from the keyboard.

cout << "Enter a test score: ";

cin >> test_score;

if (test_score < 60);

cout << "You failed the test!" << endl;

if (test_score > 60)

cout << "You passed the test!" << endl;

else

cout << "You need to study for the next test!";

Answer:

You failed the test!

You passed the test!

Explanation:

With the assumption that test_score has been declared as an int variable

The output of: You failed the test! You passed the test! May be unexpected since the test_score is greater than 90 so it looks like the code has a logical error somewhere.

This error is as a result of putting a semi colon at then end of the first if statement if (test_score < 60);

An if statement does not end a thought as such there should'nt be a semi colon ending it. Take the semi-colon out and the program will give the expected output of You passed the test! since test_score of 90 is greater than 60

You might be interested in
What are the text or graphics that are lighter than the main text located in a document's background called?
faust18 [17]
That would be a watermark
7 0
3 years ago
The sticky notes often have strings of characters written on them that appear to be passwords. What can you do to prevent the se
Varvara68 [4.7K]
Educate the user on how to make strong passwords
8 0
2 years ago
Students working at individual PCs in a computer laboratory send their files to be printed by a server that spools the files on
Vanyuwa [196]

Answer:

Explanation:

Disk space is a limited resource on the spooling partition and once it is filled the will cause a deadlock. Every single block that comes into the spooling partition claims a resource, and the one behind that wants resources as well, and so on. Since the spooling space is limited and half of the jobs arrive and fill up space then no more blocks can be stored, causing a deadlock. This can be prevented allowing one job to finish and releasing the space for the next job.

5 0
3 years ago
When working with a spreadsheet, data analysts can use the _____ function to locate specific characters in a string.
jonny [76]

When working with a spreadsheet, data analysts can use the CLEAN function to locate specific characters in a string.

<h3>What is the CLEAN Function? </h3>

The CLEAN Function is known to be a tool that is often categorized in the Excel Text functions.

Note that this function tends to delete or remove any kind of non-printable characters from any specified or given text.

Note that As financial analysts, people tend to often import data from a lot of sources and the CLEAN function can help to delete nonprintable characters.

Hence, When working with a spreadsheet, data analysts can use the CLEAN function to locate specific characters in a string.

Learn more about spreadsheet from

brainly.com/question/4965119

#SPJ1

6 0
2 years ago
1.<br> Why do you need to use sources of information when writing a formal business<br> document?
Lera25 [3.4K]

Answer:

You need sources of information when writing a formal business document because, if the person receiving the document would like to see the full source you got your information from it could help them understand better what they are reading. Also it looks more professional.

Explanation:

4 0
3 years ago
Other questions:
  • Which type of computing refers to firms purchasing computing power from remote providers and paying only for the computing power
    7·1 answer
  • If you have cut or copied a set of information, which procedure will NOT work to paste it back into the worksheet?
    14·1 answer
  • Can yall please take these points.
    11·2 answers
  • You can change the color of the value of a cell or the background color of the cell but not both.
    5·2 answers
  • When would you use a template when working with word 2013?
    15·1 answer
  • A copy of the copyrighted work must be exactly the same as the original to infringe a copyright.
    9·1 answer
  • Algorithms can be created in all the following ways EXCEPT:
    10·1 answer
  • John buy cheap stolen rims for his new truck?
    11·1 answer
  • Explain the limitations of the old economy<br>​
    15·1 answer
  • What purpose does encryption on the internet serve? Why is it so important?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!