Hello everyone!
I got DBP in the mail last night after work. After a little bit of time, I created these two programs. They aren't much at all, but they are my beginnings. The first is called the "Pet Age Converter" and the second is a rudamentary Standard/Metric conversion program. I didn't put a whole lot into it in regards to options, I just wanted to get it started. Let me know what you think? And I am posting them here as it doesn't really fit into "Showcase" due to being poor quality and it doesn't fit into the main boards for DBP and they are pretty much finished, so the WIP board doesn't fit either. If this isn't correct, please, let me know. Here they are!
Code 1 - Pet Age Converter.
Age# = 0
SET CURSOR 300,200
REM A welcome of sorts to the User
PRINT "Thank you for choosing the Pet Age Converter by Paladeus!"
wait 2000
CLS
SET CURSOR 300,200
REM The actual program working.. hopefully
INPUT "What is your pet's age in human years?", Age#
SET CURSOR 300,250
REM The operation/program working and results
PRINT "Your pet's human age would be ",Age#*7, "."
REM Allowing the User to see the results.
WAIT key
This one is my Standard/Metric Conversion program. As far as I know, it is accurate.. but I COULD have gotten the numericals wrong >.> (What to multiply by and such.)
REM Project: StandardMetricConverter
REM Created: 3/5/2006 3:24:56 PM
REM Author: Kevin Price (Paladeus)- [email protected]
REM ***** Main Source File *****
REM
REM Greeting message to User location
SET CURSOR 300,200
PRINT "Thank you for using the 'Standard/Metric Conversion' program by Paladues!"
wait 3000
cls
wait 800
print "You will be able to convert the following with this program:"
print "Metric to Standard:"
Print "1) Millimeters(mm) to Inches(in)"
wait 200
print "2) Centimeters(cm) to Inches(in)"
wait 200
print "3) Meters(m) to Feet(ft)"
Print "(More options will be coming soon.)"
print " "
wait 230
print "Standard to Metric:"
Print "4) Inches(in) to Millimeters(mm)"
wait 200
print "5) Inches(in) to Centimeters(cm)"
wait 200
print "6) Feet(ft) to Meters(m)"
wait 200
print "(More options will be coming soon.)"
wait 200
print "Please press any button to activate the program."
wait key
cls
start:
millimeters#=0
inches#=0
centimeters#=0
feet#=0
meters#=0
print "Metric to Standard:"
Print "1) Millimeters(mm) to Inches(in)"
wait 200
print "2) Centimeters(cm) to Inches(in)"
wait 200
print "3) Meters(m) to Feet(ft)"
print " "
wait 230
print "Standard to Metric:"
Print "4) Inches(in) to Millimeters(mm)"
wait 200
print "5) Inches(in) to Centimeters(cm)"
wait 200
print "6) Feet(ft) to Meters(m)"
wait 200
print "7) Exit program"
input "Choose your option: 1 to 7: ",conversions
select conversions
case 1
print "You have chosen to convert Millimeters(mm) to Inches(in)."
input "How many millimeters?:", millimeters#
print millimeter#, " millimeters equal ", millimeter#*0.03937," inches."
print "Press any key to begin this program from the options menu again."
wait key
cls
goto start
endcase
case 2
print "You have chosen to convert Centimeters(cm) to Inches(in)."
input "How many centimeters?:", centimeters#
print centimeter#, " centimeters equal ", centimeter#*0.3937, " inches."
print "Press any key to begin this program from the options menu again."
wait key
cls
goto start
endcase
case 3
print "You have chosen to convert Meters(m) to Feet(ft)."
input "How many meters?:", meters#
print meters#, " meters equal ", meters#*3.2808, " feet."
print "Press any key to begin this program from the options menu again."
wait key
cls
goto start
endcase
case 4
print "You have chosen to convert inches(in) to millimeters(mm)."
input "How many inches?:", inches#
print inches#, " inches equal ", inches#*25.4, " millimeters."
print "Press any key to begin this program from the options menu again."
wait key
cls
goto start
endcase
case 5
print "You have chosen to convert inches(in) to centimeters(cm)."
input "How many inches?:", inches#
print inches#, " inches equal ", inches#*2.54, " centimeters."
print "Press any key to begin this program from the options menu again."
wait key
cls
goto start
endcase
case 6
print "You have chosen to convert Feet(ft) to Meters(m)."
input "How many feet?:", feet#
print feet#, "feet equal ", feet#*0.3048, " meters."
print "press any key to begin this program from the options menu again."
wait key
cls
goto start
endcase
case 7
print " "
print "Exiting program."
wait 1000
end
endcase
case default
print "Your selection was invalid! Please select options 1-7."
wait 2000
cls
goto start
endcase
endselect
goto start
Criticism is good also, so if you see something not right/that could be done better, let me know? Been at this for about an hour >.> All code worked for me by the way. If it doesn't work for you, let me know and I will see if it is just something I failed to check. o.o
Kevin- Paladeus