Question
Using perl script find the solution of following questions : Q1- Local variables lengthA = 0.0 widthA = 0.0 areaA = 0.0 lengthB = 0.0
Q1-
Local variables
lengthA = 0.0
widthA = 0.0
areaA = 0.0
lengthB = 0.0
widthB = 0.0
areaB = 0.0
# Calculate area A
# Calculate area B
# Print area comparison
If AreaA is bigger Than AreaB print AreaAis bigger, Compare AreaB bigger than AreaAthen AreaB is bigger otherwise print both are equal. Print the result as well for area A and Area B with the output result
Q2:
# Named constants
RETAIL_PRICE = 199
# Local variables
quantity = 0
fullPrice = 0.0
discountRate = 0.0
discountAmount = 0.0
totalAmount = 0.0
# Calculate the discount rate
if quantity > 99 then discountRate = 0.40
if quantity > 49 then discountRate = 0.30
if quantity > 19 then discountRate = 0.20
if quantity > 9 then discountRate = 0.10
else
discountRate = 0
# Calculate the full price
quantity * RETAIL_PRICE
# Calculate the discount amount
# Calculate the total amount
Q3:
# Print results Discount Amount and total Amount
# Constants for the increase in tuition per year,
# and the starting tuition amount.
INCREASE_PER_YEAR = 0.13
STARTING_AMOUNT = 9000.0
# Declare a variable to store the tuition.
tuition = STARTING_AMOUNT
# Calculate and print amount of increase each year for atleast 5 years.
Print Increased fee and Tuition Fee
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started