CAn Someone Please Help me? Turn this program in a algorithm

DECLARE SUB RentCar ()

DECLARE SUB PayBill ()

DECLARE SUB Main ()

DECLARE SUB ReadCarData ()

DECLARE SUB FindCar ()

TYPE Car' User made Type To hold Car Data

CarNumber AS INTEGER

License AS STRING * 8

Year AS INTEGER

CarMaker AS STRING * 16

CarName AS STRING * 16

Description AS STRING * 20

ColorOfCar AS STRING * 10

NumberOfDoors AS INTEGER

Price AS DOUBLE

Rented AS INTEGER

Customer AS INTEGER

END TYPE

TYPE Customer' User made Type to hold Customer data

CustomerNumber AS INTEGER

CustName AS STRING * 50

Bill AS DOUBLE

END TYPE

DIM SHARED Cars(1 TO 26) AS Car ' Global Variables

DIM SHARED p(4) AS Customer

DIM CustName AS STRING * 50

p(0).CustName = "Kevin" ' Assign Customers who need to pay bills

p(0).Bill = 0

p(1).CustName = "Eljah"

p(1).Bill = 100

p(2).CustName = "Jared"

p(2).Bill = 55

p(3).CustName = "Claudwin"

p(3).Bill = 60

p(4).CustName = "Isaac"

p(4).Bill = 1500

CALL ReadCarData' This reads the data statements into the Cars() array.

WIDTH 80, 50' Formats screen and call the main part of the program

CALL Main

'

' CAR DATA STATEMENTS

'

'-- - --- -- -

'LICENSEYEAR MAKERMODELDESCRIPTIONCOLORDOORSPRICE

'-- - --- -- -

DATA "X-5687", 2007, "DODGE","CALIBER","FAMILY CAR", "DARK RED",4, 89.99

DATA "X-9681", 2006, "DODGE","CHARGER","SPORT","GREY",4, 47.99

DATA "X-9684", 2006, "DODGE","RAM 2500","PICKUP","BLACK",4, 101.99

DATA "X-9437", 2004, "FORD","MUSTANG","SPORT","RED",2, 45.99

DATA "X-2562", 2002, "FORD","TAURUS","SEDAN","LIGHT GREY", 4, 67.99

DATA "X-3856", 2003, "FORD","CONTOUR","SMALL","LIGHT BLUE", 2, 45.99

DATA "X-2724", 2001, "FORD","BRONCO","JEEP","BLACK",4, 63.99

DATA "X-2724", 2001, "FORD","BRONCO","JEEP","DARK GREEN", 4, 63.99

DATA "X-8568", 1998, "FORD","ESCORT","COMPACT","BROWN",2, 35.99

DATA "X-4724", 2004, "FORD","PROBE","SPORT","BLACK",2, 58.99

DATA "X-4724", 2004, "FORD","PROBE","SPORT","RED",2, 58.99

DATA "X-4724", 2004, "FORD","PROBE","SPORT","YELLOW",2, 58.99

DATA "X-4724", 2003, "FORD","AEROSTAR","S.U.V.","DARK GREEN", 4, 87.99

DATA "X-2727", 1999, "PONTIAC","GRAND AM","SPORT CAR", "BLACK",2, 45.99

DATA "X-2327", 1999, "PONTIAC","GRAND AM","SPORT CAR", "RED",2, 45.99

DATA "X-2767", 1999, "PONTIAC","GRAND AM","SPORT CAR", "GREY",2, 45.99

DATA "X-2723", 1999, "PONTIAC","GRAND AM","SPORT CAR", "PURPLE",2, 45.99

DATA "X-8486", 2005, "PONTIAC","TRANSPORT","S.U.V.","WHITE",2, 96.99

DATA "X-3261", 2005, "PONTIAC","AZTEC","S.U.V.","YELLOW",4, 93.99

DATA "X-1864", 2006, "PONTIAC","TORRENT","S.U.V.","RED",4, 98.99

DATA "X-8521", 2006, "MERCURY","COUGAR","SPORT","BLACK",2, 69.99

DATA "X-8471", 2006, "LINCOLN","TOWN CAR","LUXURY","BLACK",4, 149.99

DATA "X-8635", 2001, "LINCOLN","CONTINENTAL", "LUXURY","GOLD",4, 139.99

DATA "X-2643", 2006, "CHEVROLET", "F-150","PICKUP","GREY",2, 95.99

DATA "X-7143", 2006, "CHEVROLET", "CORVETTE","SPORT","YELLOW",2, 131.99

DATA "X-7378", 2006, "CHEVROLET", "MALIBU","SEDAN","BLACK",4, 81.99

SUB FindCar ' This sub goes through the data to search for a car

DIM Counter AS INTEGER 'variables need for sub

DIM TempMaker AS STRING

DIM TempModel AS STRING

DIM TempColor AS STRING

DIM TempCarType AS STRING

DIM TempRangeFrom AS DOUBLE

DIM TempRangeTo AS DOUBLE

DIM TempMax AS DOUBLE

DIM TempMin AS DOUBLE

DIM LeaveFindCar AS INTEGER

DIM MoreCar AS STRING

DIM CanDisplay AS INTEGER

DO WHILE LeaveFindCar = 0' Main loop to find type of car

' Initialize the variables

Counter = 0

TempMaker = ""

TempModel = ""

TempColor = ""

TempRangeFrom = 0

TempRangeTo = 0

CLS ' Draw the screen with the search fields"

COLOR 15

PRINT "FIND IDEAL CAR: (Enter one or more of these items)"

PRINT STRING$(80, CHR$(196))

COLOR 11

PRINT "Car Builder:"

PRINT "Car Model:"

PRINT "Car Color:"

PRINT "Price Range: From: To:"

COLOR 10' GetsUser can enter any search fields he wants

LOCATE 3, 19

INPUT TempMaker

LOCATE 4, 19

INPUT TempModel

LOCATE 5, 19

INPUT TempColor

LOCATE 6, 19

INPUT TempRangeFrom

LOCATE 6, 36

INPUT TempRangeTo

COLOR 15

PRINT STRING$(80, CHR$(196))

CanDisplay = 0

FOR Counter = 1 TO 26'' This loop does the actual search of the matching cars

'We compare all string type variables as an

'uppercase (UCASE$) and Right Trimmed (RTRIM$)

'to avoid having to compare upper and lower case

'Values, this makes the condtions here twice

'as short to perform.

IF RTRIM$(TempMaker) <> "" THEN

IF UCASE$(RTRIM$(Cars(Counter).CarMaker)) = UCASE$(RTRIM$(TempMaker)) THEN

IF RTRIM$(TempModel) <> "" THEN

IF UCASE$(RTRIM$(Cars(Counter).CarName)) = UCASE$(RTRIM$(TempModel)) THEN

IF RTRIM$(TempColor) <> "" THEN

IF UCASE$(RTRIM$(Cars(Counter).ColorOfCar)) = UCASE$(RTRIM$(TempColor)) THEN

IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN

IF TempRangeFrom > TempRangeTo THEN

TempMin = TempRangeTo

TempMax = TempRangeFrom

ELSE

TempMin = TempRangeFrom

TempMax = TempRangeTo

END IF

' If Price of car is in between Mininum and Maximum Price

'Allows to display the record.

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

END IF

ELSE

CanDisplay = 0

END IF

ELSE

' The IF is to set Min to the smallest of

' the range vales and TempMax to the biggest.

IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN

IF TempRangeFrom > TempRangeTo THEN

TempMin = TempRangeTo

TempMax = TempRangeFrom

ELSE

TempMin = TempRangeFrom

TempMax = TempRangeTo

END IF

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

END IF

END IF

ELSE

CanDisplay = 0

END IF

ELSE

IF RTRIM$(TempColor) <> "" THEN

IF UCASE$(RTRIM$(Cars(Counter).ColorOfCar)) = UCASE$(RTRIM$(TempColor)) THEN

' This IF is to set Min to the smallest of

' the range values and Max to the biggest.

IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN

IF TempRangeFrom > TempRangeTo THEN

TempMin = TempRangeTo

TempMax = TempRangeFrom

ELSE

TempMin = TempRangeFrom

TempMax = TempRangeTo

END IF

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

END IF

ELSE

CanDisplay = 0

END IF

ELSE

' The IF is to set Min to the smallest of

' the range vales and Max to the biggest.

IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN

IF TempRangeFrom > TempRangeTo THEN

TempMin = TempRangeTo

TempMax = TempRangeFrom

ELSE

TempMin = TempRangeFrom

TempMax = TempRangeTo

END IF

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

ELSEIF TempRangeFrom = 0 AND TempRangeTo > 0 THEN' The IF one of the range to be 0

TempMin = TempRangeFrom

TempMax = TempRangeTo

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

ELSEIF TempRangeFrom > 0 AND TempRangeTo = 0 THEN' This IF one of the range to be 0

TempMin = TempRangeTo

TempMax = TempRangeFrom

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

ELSE

CanDisplay = 1

END IF

END IF

END IF

END IF

ELSE

'Same as previously, all string variables are UCASEd and

'RTRIMmed to shorten the comparison lenghts.

IF RTRIM$(TempModel) <> "" THEN

IF UCASE$(RTRIM$(Cars(Counter).CarName)) = UCASE$(RTRIM$(TempModel)) THEN

IF RTRIM$(TempColor) <> "" THEN

IF UCASE$(RTRIM$(Cars(Counter).ColorOfCar)) = UCASE$(RTRIM$(TempColor)) THEN

IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN

IF TempRangeFrom > TempRangeTo THEN

' This IF is to setMin to the smallest of

' the range vales and Max to the biggest

TempMin = TempRangeTo

TempMax = TempRangeFrom

ELSE

TempMin = TempRangeFrom

TempMax = TempRangeTo

END IF

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

END IF

ELSE

CanDisplay = 0

END IF

ELSE

' This IF is to setMin to the smallest of

' the range vales and Max to the biggest

IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN

IF TempRangeFrom > TempRangeTo THEN

TempMin = TempRangeTo

TempMax = TempRangeFrom

ELSE

TempMin = TempRangeFrom

TempMax = TempRangeTo

END IF

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

END IF

END IF

ELSE

CanDisplay = 0

END IF

ELSE

IF RTRIM$(TempColor) <> "" THEN

IF UCASE$(RTRIM$(Cars(Counter).ColorOfCar)) = UCASE$(RTRIM$(TempColor)) THEN

' This IF is to setMin to the smallest of

' the range vales and Max to the biggest

IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN

IF TempRangeFrom > TempRangeTo THEN

TempMin = TempRangeTo

TempMax = TempRangeFrom

ELSE

TempMin = TempRangeFrom

TempMax = TempRangeTo

END IF

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

ELSE

CanDisplay = 1

END IF

ELSE

CanDisplay = 0

END IF

ELSE

' This IF is to setMin to the smallest of

' the range vales and Max to the biggest

IF TempRangeFrom > 0 AND TempRangeTo > 0 THEN

IF TempRangeFrom > TempRangeTo THEN

TempMin = TempRangeTo

TempMax = TempRangeFrom

ELSE

TempMin = TempRangeFrom

TempMax = TempRangeTo

END IF

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

ELSEIF TempRangeFrom = 0 AND TempRangeTo > 0 THEN

TempMin = TempRangeFrom

TempMax = TempRangeTo

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

ELSEIF TempRangeFrom > 0 AND TempRangeTo = 0 THEN

TempMin = TempRangeTo

TempMax = TempRangeFrom

IF Cars(Counter).Price >= TempMin AND Cars(Counter).Price <= TempMax THEN

CanDisplay = 1

ELSE

CanDisplay = 0

END IF

ELSE

CanDisplay = 1

END IF

END IF

END IF

END IF

IF CanDisplay = 1 THEN' If car match fields entered it is displayed

COLOR 11

PRINT Cars(Counter).CarNumber;

PRINT " " + RTRIM$(Cars(Counter).License);

PRINT " - " + RTRIM$(Cars(Counter).CarMaker);

PRINT " " + RTRIM$(Cars(Counter).CarName);

PRINT " " + RTRIM$(Cars(Counter).Description);

PRINT " " + RTRIM$(Cars(Counter).ColorOfCar);

PRINT TAB(60); USING " $###.##"; Cars(Counter).Price

CanDisplay = 0

END IF

NEXT Counter' displays line after listing cars

COLOR 15

PRINT STRING$(80, CHR$(196))

DO WHILE UCASE$(MoreCar) <> "Y" AND UCASE$(MoreCar) <> "N"

LOCATE CSRLIN, 1' This loop ask useers if they want another car search

PRINT "Find Another Car (Y/N)"

INPUT MoreCar

LOOP

IF UCASE$(MoreCar) = "N" THEN ' If user entered "n" the loop is exited

LeaveFindCar = 1

END IF

MoreCar = ""

LOOP

END SUB

SUB Main

' This SUB is the main part of the program. It displays

' the menu and accepts the choices from the user, when the

' user picks a valid value, it executes the proper choice

DO

CLS

COLOR 15

'print the menu on the screen

LOCATE 1, 33

PRINT "RENT CARS PLUS"

LOCATE 2, 1

PRINT STRING$(80, CHR$(196))

COLOR 11

PRINT " 1 - Pay Bill"

PRINT " 2 - Rent Car"

PRINT " 3 - Find Ideal Car"

PRINT " 999 - Exit"

COLOR 15

PRINT STRING$(80, CHR$(196))

INPUT "Choice: ", Choice ' The user enters his/her choice

IF Choice = 999 THEN END

IF Choice <> 999 AND Choice <> 1 AND Choice <> 2 AND Choice <> 3 THEN

PRINT " Error Please Enter Correct Choice! " ' If not valid answer user is asked to enter correct choice

END IF

SELECT CASE Choice' This Select Case executes the subprograms options

CASE 1

CALL PayBill

CASE 2

CALL RentCar

CASE 3

CALL FindCar

CASE 5

END SELECT

LOOP UNTIL Choice = 999

END SUB

SUB PayBill' This sub does the bill paying process.

' it asks a few question to the user to get the right

' information and be able to pay the given bill.

'

DIM CustName AS STRING

DIM MoreBill AS INTEGER

DIM Answer AS STRING

DIM Flag AS INTEGER

COLOR 15

MoreBill = 0' To start loop variable

DO WHILE MoreBill = 0' Loop to start the Bill Paying Process

StartBill:

' Displays screen to user

CLS

COLOR 15

PRINT "PAY A BILL"

PRINT STRING$(80, CHR$(196))

INPUT "Customer Name: ", CustName ' user enters customer name

Flag = 0

FOR Q = 0 TO 4' Loops to search for customer name in array

IF UCASE$(RTRIM$(p(Q).CustName)) = UCASE$(RTRIM$(CustName)) THEN

Flag = 1

PRINT p(Q).CustName; p(Q).Bill

EXIT FOR

END IF

NEXT Q

'' If customer name invalid error message displayed

IF Flag = 0 THEN

PRINT "Invalid name. Press a key to try again."

DO WHILE INKEY$ <> "": LOOP

GOTO StartBill

END IF

MethodInput:

DO

LOCATE 4, 1' Display Payment methods and wait for user to pick one

COLOR 11

PRINT "We only use Visa or American Express. How do you wish to pay?"

PRINT "1 - Visa"

PRINT "2 - American Express"

PRINT "3 - Check"

PRINT "4 - Cash"

INPUT "Select 1, 2, 3, or 4: ", howtopay$ ' User enters way to pay

IF howtopay$ = "1" OR howtopay$ = "2" THEN ' CArd number asked for If american or visa

INPUT "Enter account number: ", cardnum$

ELSEIF howtopay$ <> "3" AND howtopay$ <> "4" THEN

PRINT "You must select method of payment."

END IF

LOOP WHILE howtopay$ < "1" OR howtopay$ > "4"

PaymentInput:

'' users enters payment amount

INPUT "Payment Amount (0 to cancel the transaction): ", PayAmount

IF PayAmount <> 0 THEN

IF PayAmount > p(Q).Bill THEN

'' If payment bigger than amount owed message displayed

PRINT "Payment is bigger than amount due. Press key to enter payment."

DO WHILE INKEY$ = "": LOOP

GOTO PaymentInput

ELSE

' If amount valid , payment subtracted from amount owed

p(Q).Bill = p(Q).Bill - PayAmount

PRINT "New balance is "; USING "$#####.##"; p(Q).Bill

END IF

END IF

'' Loop ask if user wishes to pay another bill

DO WHILE UCASE$(RTRIM$(Answer)) <> "Y" AND UCASE$(RTRIM$(Answer)) <> "N"

COLOR 15

LOCATE 48, 1

PRINT "Pay Another Bill (Y/N) ";

INPUT Answer

LOOP

IF UCASE$(RTRIM$(Answer)) = "N" THEN ' If answer is "N" then loop exited

MoreBill = 1

END IF

LOOP

END SUB

SUB ReadCarData

' This sub reads all data from the DATA statements

' And puts them in the Cars array

DIM Counter AS INTEGER

FOR Counter = 1 TO 26

Cars(Counter).CarNumber = Counter

READ Cars(Counter).License

READ Cars(Counter).Year

READ Cars(Counter).CarMaker

READ Cars(Counter).CarName

READ Cars(Counter).Description

READ Cars(Counter).ColorOfCar

READ Cars(Counter).NumberOfDoors

READ Cars(Counter).Price

NEXT Counter

END SUB

SUB RentCar

' This sub does the renting of a car

' to a customer. This ask several questions

' in order to get the right customer and the right

' car to rent then it rents it.

DIM MoreRent AS INTEGER

DIM TempCustomer AS INTEGER

DIM TempBill AS DOUBLE

DIM Answer AS STRING

DIM TempPrice AS DOUBLE

DIM TempInsurance AS DOUBLE

DIM CustName AS STRING

DIM Number AS STRING

DIM CarNumber AS INTEGER

DIM Days AS INTEGER

DIM Q AS INTEGER

MoreRent = 0' Loop for rental process

DO WHILE MoreRent = 0

InputName:

CLS ' Display screen to user

COLOR 15

PRINT "RENT A CAR"

PRINT STRING$(80, CHR$(196))

COLOR 11

LOCATE 3, 1

INPUT " Full Name:", CustName ' user enters his name

IF RTRIM$(CustName) = "" THEN

PRINT "You Must Enter Your Name. Press a key to retry." ' User is told he must enter a name

DO WHILE INKEY$ = "": LOOP

GOTO InputName

ELSE

FOR Q = 0 TO 4

IF UCASE$(RTRIM$(p(Q).CustName)) = UCASE$(RTRIM$(CustName)) THEN

Flag = 1

PRINT p(Q).CustName; p(Q).Bill

TempCustomer = Q

EXIT FOR

END IF

NEXT Q

END IF

InputNumber:

LOCATE 5, 1

INPUT " Phone Number: ", Number ' User enters phone number

IF RTRIM$(Number) = "" THEN

PRINT "You Must a phone number. Press a key to retry." ' User is warned he must enter a number

DO WHILE INKEY$ = "": LOOP

GOTO InputNumber

END IF

CarInput:

LOCATE 7, 2

COLOR 11

INPUT "Car Number:", CarNumber

' This awaits a car number from the user.

IF CarNumber < 1 AND CarNumber > 26 THEN ' If the car number is out of range, we warn and start again

PRINT "Car Number must be between 1 and 26. Press a key to retry."

DO WHILE INKEY$ = "": LOOP

GOTO CarInput

ELSE

' No need to search, we just display the car information

COLOR 14

PRINT RTRIM$(Cars(CarNumber).License) + " - ";

PRINT Cars(CarNumber).Year;

PRINT RTRIM$(Cars(CarNumber).CarMaker) + " " + RTRIM$(Cars(CarNumber).CarName) + " ";

PRINT RTRIM$(Cars(CarNumber).ColorOfCar)

PRINT "PRICE: "; USING "$####.##"; Cars(CarNumber).Price

END IF

DaysInput:

LOCATE 10, 1

COLOR 11

INPUT " Number of Days to rent: ", Days

' This awaits for a number of days to rent the car for.

IF Days < 1 AND Days > 31 THEN

PRINT "Days are 1 to 31. Press a key to retry."

' Can't have less than 1 day or more than a month or we warn.

DO WHILE INKEY$ = "": LOOP

GOTO DaysInput

END IF

TempPrice = Days * Cars(CarNumber).Price

' Calculate the Price of the rental

InsuranceInput:

LOCATE 13, 1

COLOR 11

DO WHILE UCASE$(RTRIM$(Answer)) <> "Y" AND UCASE$(RTRIM$(Answer)) <> "N"

COLOR 11

LOCATE 13, 1

PRINT "Add Insurance (Y/N)";

' the customer has the option to purchase insurance here.

INPUT Answer

LOOP

IF UCASE$(Answer) = "Y" THEN

COLOR 11

DO WHILE UCASE$(RTRIM$(Answer)) <> "F" AND UCASE$(RTRIM$(Answer)) <> "D"

'we loop until the users enters y or n

COLOR 11

LOCATE 14, 1

PRINT "(F)ixed Or (D)aily Amount";

' If the user selected yes, we ask for fixed or daily insurance amount.

INPUT Answer

LOOP

' if Fixed amount was picked we ask for that amount

IF UCASE$(RTRIM$(Answer)) = "F" THEN

INPUT "Fixed Insurance: ", TempInsurance

ELSE

TempInsurance = 15 * Days ' If Daily was picked we multiply 15 by the number of days rented

END IF

END IF

DO' this loop asks for a payment method.

LOCATE 17, 1

PRINT "We only use Visa or American Express. How do you wish to pay?"

PRINT "1 - Visa"

PRINT "2 - American Express"

PRINT "3 - Check"

PRINT "4 - Cash"

INPUT "Select 1, 2, 3, or 4: ", howtopay$

IF howtopay$ = "1" OR howtopay$ = "2" THEN

INPUT "Enter account number: ", cardnum$

ELSEIF howtopay$ <> "3" AND howtopay$ <> "4" THEN

PRINT "You must select method of payment."

END IF

LOOP WHILE howtopay$ < "1" OR howtopay$ > "4"

COLOR 14

PRINT

' This part displays some totals to the user.

PRINT "Rental Price= "; USING "$##,###.##"; TempPrice

PRINT "Insurance Amount = "; USING "$##,###.##"; TempInsurance

PRINT "Total Price= "; USING "$##,###.##"; TempPrice + TempInsurance

PRINT "-"

TempBill = p(TempCustomer).Bill

TempBill = TempBill + (TempPrice + TempInsurance)

p(TempCustomer).Bill = TempBill

PRINT "New Balance= "; USING "$##,###.##"; TempBill

PRINT "=========="

Answer = ""

' This loop asks if the user wants to rent another car.

DO WHILE UCASE$(RTRIM$(Answer)) <> "Y" AND UCASE$(RTRIM$(Answer)) <> "N"

COLOR 15

LOCATE 48, 1

PRINT "Rent Another Car (Y/N) ";

INPUT Answer

LOOP

IF UCASE$(RTRIM$(Answer)) = "N" THEN

' If user selected N, we assign value to exit the loop

MoreRent = 1

END IF

LOOP

END SUB

Im really good at programming but really suck at algorithms can someone please please write in a algorithm form for me , i need it by friday i would greatly be thankful for u

[22652 byte] By [yusefia] at [2007-10-2 16:24:06]
# 1
Looks like homework.And it is unclear to me how you would turn that code into an algorithm using the traditional definition. It is an application and not an algorithm.
jschella at 2007-7-13 17:21:51 > top of Java-index,Other Topics,Algorithms...
# 2
So, you come to a Java forum to ask people to turn a whole bunch of non-Java code into an algorithm (whatever that's supposed to mean), for free, and which, as far as I can tell, is your homework, and therefore your responsibility to do yourself.Lovely.
jverda at 2007-7-13 17:21:51 > top of Java-index,Other Topics,Algorithms...
# 3
> Im really good at programming but really suck at> algorithms...Drake
Drake_Duna at 2007-7-13 17:21:51 > top of Java-index,Other Topics,Algorithms...
# 4
Probably the same OP as in this thread: http://forum.java.sun.com/thread.jspa?threadID=723051If not, here's the same advise: http://www.rentacoder.com/
prometheuzza at 2007-7-13 17:21:51 > top of Java-index,Other Topics,Algorithms...
# 5

>>Im really good at programming but really suck at algorithms

>If your are 'really good' at programming, you will be able to solve this problem. Because, it has nothing to do with algorithm.

>>can someone please please write in a algorithm form for me , i need it by friday i would greatly be thankful for u

>Wrong person, in the wrong place.

buteForcea at 2007-7-13 17:21:51 > top of Java-index,Other Topics,Algorithms...
# 6

> Im really good at programming but really suck at

> algorithms can someone please please write in a

> algorithm form for me ,

I wouid guess you actually need pseudo code.

And the only way that you can be good at programming and not good a pseudo code is because you don't understand the concept of pseudo code.

jschella at 2007-7-13 17:21:51 > top of Java-index,Other Topics,Algorithms...
# 7

Quick basic, what a thing of beauty!

Assuming you have no QBasic manual to work from, the main thing you need to know is that the LOCATE function is what was used for drawing text strings at a location on the good old glass teletype. You can probably guess the meaning of most of the other instructions.

What do you do? Since the Basic code is so simple, you write a translator. One line of QB code converts to a line or two of Java.

marlin314a at 2007-7-13 17:21:51 > top of Java-index,Other Topics,Algorithms...