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
tensa zangetsu [6.8K]
3 years ago
11

Write the execution steps if the input is a lion.

Computers and Technology
1 answer:
balandron [24]3 years ago
7 0

Explanation:

Execution step:

1. Starting the program

2. It will get the animal name

3. Check whether the animal eats only plants. Then it prints "Herbivore". If the condition is false, it prints "carnivore".

4. Stop the program

To identify input, output and decision:

Start and Stop (oval): These are neither input nor output

Does it eat only plants?: Decision making statement ("d")

Read the names of the animals(Parallelogram): Input ("i")

Print Herbivore, Print Carnivore: Output "o"

Scenario 1: Input is lion

1. Start

2. Reads the input as "lion"

3. Check if lion eats only plants. So here it is false

4. Print "Carnivore"

5. Stop

Scenario 1: Input is Elephant

1. Start

2. Reads the input as "Elephant"

3. Check if lion eats only plants. So here it is true

4. Print "Herbivore"

5. Stop

You might be interested in
Suppose you create a class Square to be a subclass of GeometricObject. Analyze the following code:
Lemur [1.5K]

Answer:

B. The program has a compile error because you attempted to invoke the GeometricObject class's constructor illegally.

Explanation:

To call a superclass constructor, the user must use super(). This is necessary unless default constructors are used. Also, it is vital to make sure if their are appropriate argument to be used while invoking the superclass constructor.

3 0
3 years ago
Consider the function definition void Demo( int& intVal, float floatVal ) { intVal = intVal * 2; floatVal = float(intVal) +
Fynjy0 [20]

Answer:

myInt=40

myFloat=4.8

Explanation:

First look at the function definition .It has two arguments intVal is passed by reference while floatVal is passed by value.So the changes done on the myInt variable will be reflected on the original argument because when a variable is passed by reference the the changes are reflected on the original argument but when a variable is passed by value the function created a duplicate copy of it and work on them so changes are not reflected on the original argument.So myInt will get doubled while myFloat will remain the same.

5 0
3 years ago
Plz answer me will mark as brainliest​
ryzh [129]
Expansion Slot
ROM
Hope this helped
6 0
3 years ago
A member of your team wants to add some funny pictures that he took during the company party to lighten the mood at the beginnin
san4es73 [151]
No, because they are personal photos taken of an event that was not copyrighted. If the event was copyrighted then they would but if not then no.
7 0
3 years ago
Read 2 more answers
How do you level up? I don't have spells on here like I do in w.o.w
umka2103 [35]
You answer questions and complete challenges to get points, and for higher levels, you also have to get enough Brainliest answers.
8 0
3 years ago
Read 2 more answers
Other questions:
  • You can select slide objects in order to delete them simultaneously by pressing the _____ key as you click each object. select o
    7·2 answers
  • What is an IP address and where I can find the IP address for my computer?
    14·1 answer
  • Write a calculator program that keeps track of a subtotal like real calculators do. Start by asking the user for an initial numb
    12·1 answer
  • Place the steps in order to link and place text into the document outline, effectively creating a master document.
    8·1 answer
  • HELP PLEASE I WILL GIVE YOU 15 POINTS!
    8·1 answer
  • You want to substitute one word with another throughout your
    13·1 answer
  • ¿Cuál es la diferencia entre una plataforma educativa y una tutoría?
    7·1 answer
  • Difference between switch and switch lite
    10·1 answer
  • Discuss the advantages and disadvantages of supporting links to files that cross mount points (that is, the file link refers to
    6·1 answer
  • Exam Instructions
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!