Study the following variables with their initial values and the statements that follow, which is based on the variables and their initial values. Indicate which of the outputs provided will be displayed after the statements have been executed. Description Integer to enter Half of number Third of number Quarter of number DisplayFractions display "Enter an integer" enter number half = number / 2 third = number / 3 quarter = number / 4 display "Half of the number is", half display "A third of the number is ", third display "A quarter of the number is", quarter end Integer real real real Type number half third quarter Variable name 45 Initial Value

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 15PE
icon
Related questions
Question
100%
Study the following variables with their initial values and the statements that follow, which is based on the variables and their initial values. Indicate which of the outputs
provided will be displayed after the statements have been executed.
Description
Integer to enter
Half of number
Third of number
Quarter of number
DisplayFractions
display "Enter an integer"
enter number
half = number / 2
third = number / 3
quarter = number / 4
display "Half of the number is", half
display "A third of the number is ", third
display "A quarter of the number is", quarter
end
Select one:
a. Half of the number is 22.5
A third of the number is 15.0
A quarter of the number is 11.25
b. Half of the number is 26.5
A third of the number is 13.0
A quarter of the number is 10.25
O c. display "Half of the number is", number / 2
display "A third of the number is", number / 3
display "A quarter of the number is", number / 4
O d. display "Half of the number is ",22.5
Integer
real
real
real
display "A third of the number is ",15.0
display "A quarter of the number is ",15.0
Type
number
half
third
quarter
Variable name
45
Initial Value
Transcribed Image Text:Study the following variables with their initial values and the statements that follow, which is based on the variables and their initial values. Indicate which of the outputs provided will be displayed after the statements have been executed. Description Integer to enter Half of number Third of number Quarter of number DisplayFractions display "Enter an integer" enter number half = number / 2 third = number / 3 quarter = number / 4 display "Half of the number is", half display "A third of the number is ", third display "A quarter of the number is", quarter end Select one: a. Half of the number is 22.5 A third of the number is 15.0 A quarter of the number is 11.25 b. Half of the number is 26.5 A third of the number is 13.0 A quarter of the number is 10.25 O c. display "Half of the number is", number / 2 display "A third of the number is", number / 3 display "A quarter of the number is", number / 4 O d. display "Half of the number is ",22.5 Integer real real real display "A third of the number is ",15.0 display "A quarter of the number is ",15.0 Type number half third quarter Variable name 45 Initial Value
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning