Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using perl script find the solution of following questions : Q1- Local variables lengthA = 0.0 widthA = 0.0 areaA = 0.0 lengthB = 0.0

Using perl script find the solution of following questions :

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2006 Edbt 2006 Workshops Phd Datax Iidb Iiha Icsnw Qlqp Pim Parma And Reactivity On The Web Munich Germany March 2006 Revised Selected Papers Lncs 4254

Authors: Torsten Grust ,Hagen Hopfner ,Arantza Illarramendi ,Stefan Jablonski ,Marco Mesiti ,Sascha Muller ,Paula-Lavinia Patranjan ,Kai-Uwe Sattler ,Myra Spiliopoulou ,Jef Wijsen

2006th Edition

3540467882, 978-3540467885

More Books

Students also viewed these Databases questions

Question

Prepare a constructive performance appraisal.

Answered: 1 week ago

Question

List the advantages of correct report formatting.

Answered: 1 week ago