Use the Block IF statement to do the following where n has been declared as an integer and x as a real: i. ifn<1, decrease x by three times of itself ii. if 1

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 13RQ
icon
Related questions
icon
Concept explainers
Question
Use the Block IF statement to do the following where n has been declared as an integer
and x as a real:
i. ifn<1, decrease x by three times of itself
ii. if 1 <n<5 , increase x by four times of itself
iii. if 5 <ns 50, decrease x by ten
iv. Otherwise increase x to 100
Transcribed Image Text:Use the Block IF statement to do the following where n has been declared as an integer and x as a real: i. ifn<1, decrease x by three times of itself ii. if 1 <n<5 , increase x by four times of itself iii. if 5 <ns 50, decrease x by ten iv. Otherwise increase x to 100
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Control Structure
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr