Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


algorithm: arrays qn

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,470
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> algorithm: arrays qn
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 algorithm: arrays qn - 11/4/2001 8:49:24 AM   
  me

 

Posts: 3
Score: 0
Joined: 10/29/2001
From: Australia
Status: offline
Fred auto dealership requires a program that will calculate the sales discount to be applied to a vehicle, based on its year of manufacture and type.

The discount extracted from a 2 dimensional table as follows: year of manuf. Of the vehicle is divided into 6 categories (1999, 1998, 97, 96, 95, 94) and the type of car is divided into 5 categories (mini, small, med, full-size, and luxury). No discount is given for a vehicle older than 1994.

Discount percentage
YrManuf. Mini Small Medium Full
size Luxury
1999 0.05 0.055 .06 .065 .07
1998 .04 .045 .05 .055 .06
1997 .03 .035 .04 .045 .05
1996 .02 .025 .03 .035 .04
1995 .01 .015 .02 .025 .03
1994 .05 .01 .015 .02 .025

P/s : .04 = 0.04 (typing for convenience, thanks)


Your program is to read the vehicle file, which contains the customer number, customer name, make of car, year of manuf, car type code(1,2,3, 4,or 5) and sales price. Use the year of manuf. And car type code as indexes to retrieve the discount percentage from the discount percentage table. Then apply the discount percentage to the sales price to determine the discounted price of the vehicle.

REQUIRED:
write a solution algorithm.
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> algorithm: arrays qn Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts