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
Gelneren [198K]
4 years ago
12

Consider the following statements. If the input is 95, the output of the following code will be: #include #include using namespa

ce std; int main () { float score; string grade; cin >> score; grade = "Unknown"; if (score >= 90) grade = "A"; if (score >= 80) grade = "B"; if (score >= 70) grade = "C"; else grade = "F"; cout << grade; }
Computers and Technology
1 answer:
kenny6666 [7]4 years ago
8 0

Answer:

The output will be "C"; without the quotes

Explanation:

Given

The program above

Required

What will be the output if user input is 95

The output will be 95;

<em>Analysis</em>

1. Initially, grade = "Unknown"

grade = "Unknown";

2. Because user input is greater than 90, grade changes its value from "Unknown" to: grade = "A"

if (score >= 90)

grade = "A";

2. Because user input is greater than 80, grade changes its value from "A" to: grade = "B"

if (score >= 80)

grade = "B";

3. Because user input is greater than 70, grade changes its value from "B" to: grade = "C"

if (score >= 70)

grade = "C";

4. This will not be executed because it specifies that if user input is less than 70; Since, this statement is false; the value of grade is still "C"

else grade = "F";

5. The value of grade is printed

cout << grade;

You might be interested in
The "fathers of the Internet" are Vinton Cerf and ________. Select one: A. Tim Berners-Lee B. Bill Gates C. Robert Kahn D. Rober
yulyashka [42]

Answer:

The fathers of the internet are Vinton Cerf and Robert Kahn

Explanation:

Vinton G. Cerf (Vint) was born in 1943 and is an American computer scientist. He researched at Stanford University on packet interconnection protocols and partnered with Robert Kahn in the design and development of the TCP/IP protocol.

Robert E. Kahn was born in 1938 and is an American engineer and computer scientist who worked with Vinton G. Cerf on the development of the TCP/IP protocol which is the crux of the internet today.

Among multiple achievements and awards, they have been awarded the Presidential Medal of Freedom by President Bush in 2005.

8 0
3 years ago
Harmful programs used to disrupt computer operation, gather sensitive information, or gain unauthorized access to computer syste
Wewaii [24]

Answer:

B. Malware

Explanation:

Malware is general to most harmful programs on a computer, as Adware is a potentially unwanted program that is designed to advertise other programs or services. And ransomware is a program that will encrypt important user files such as; documents, pictures, and videos. Spyware is a program that is designed to spy on users, examples are; using your camera without your consent, key-loggers, and taking screenshots of our desktop. Thus i believe it is malware because the question covers multiple categories.

6 0
4 years ago
Phishing is a broad term that describes any program that is designed to cause harm or transmit information to others without the
katrin [286]
False phishing is the fraudulent practice of sending emails purporting to be from reputable companies in order to induce individuals to reveal personal information, such as passwords and credit card numbers.
6 0
4 years ago
Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outpu
Bond [772]

Answer:

user_string = input("Input a string : ")

output = user_string.isnumeric()

if output == True:

   print("yes")

else:

   print("no")

Explanation:

  • First of all check whether user input have all numeric value or not .
  • Display yes if string contain all numeric values .
  • Display no if string contain at least one non - integer character .

7 0
4 years ago
Read 2 more answers
What is the device manager in windows 8?
astraxan [27]
This is the answer hope it helps :D

5 0
3 years ago
Other questions:
  • Can a computer evaluate an expression to something between true and false? Can you write an expression to deal with a "maybe" an
    13·2 answers
  • True or false the primary advantage of the worksheet is the ability to solve numerical problems quickly and accurately
    11·1 answer
  • Interest rate risks would be most relevant to what purchase?
    7·2 answers
  • This measures how close a biometric reading is to a prerecorded template
    11·1 answer
  • Describe one type of technology that is useful in producing images from space.
    9·1 answer
  • The Telecommunications Act of 1996 was a mixed bag for cable customers. Although cable companies argued that it would bring more
    8·1 answer
  • C++
    11·2 answers
  • Who are the following furries?
    10·2 answers
  • Each bolt diameter in the standard system can have one of two thread pitches, or UNE.​
    10·1 answer
  • I have no idea how to use the sep and end in Python can someone help me I have a test tomorrow
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!