Page 1 of 1
My Qbasic Code (I want to show you guys what I did)
Posted: Mon Jul 10, 2006 5:57 pm
by neo
REM Two Rectangle Calculations
REM Carlos Matos
REM 8/11/06
'
REM Assign Data
LET Ftb$ = " a football field "
LET Bball$ = " a basketball court "
LET num = 2
LET Ftb1Length = 360
LET Ftb1Width = 160
LET Bball1Length = 94
LET Bball1Width = 50
'
REM Calculating Variables
LET Ftb1Perimeter = num * Ftb1Length + num * Ftb1Width
LET Bball1Perimeter = num * Bball1Length + num * Bball1Width
LET Ftb1Area = Ftb1Length * Ftb1Width
LET Bball1Area = Bball1Length * Bball1Width
'
REM Football Field Results
CLS
PRINT "The length of"; Ftb$; "is"; Ftb1Length; ""
PRINT "The width of"; Ftb$; "is"; Ftb1Witdh; ""
PRINT "The perimeter of"; Ftb$; "is"; Ftb1Perimeter; ""
PRINT "The area of"; Ftb$; "is"; Ftb1Area; ""
'
REM Basketball Court Results
PRINT "The length of"; Bball$; "is"; Bball1Length; ""
PRINT "The width of"; Bball$; "is"; Bball1Width; ""
PRINT "The perimeter of"; Bball$; "is"; Bball1Perimeter; ""
PRINT "The area of"; Bball$; "is"; Bball1Area; ""
END
Re: My Qbasic Code (I want to show you guys what I did)
Posted: Tue Jul 11, 2006 3:05 pm
by Hunchman801
This is a very simple code, but I should you should let people enter the values they want for lenghts

Re: My Qbasic Code (I want to show you guys what I did)
Posted: Tue Jul 11, 2006 3:10 pm
by neo
Yep, thats what I'm learning in Computer Programming class.

Re: My Qbasic Code (I want to show you guys what I did)
Posted: Tue Jul 11, 2006 4:24 pm
by Hunchman801
Then feel free to post here everything you code

Re: My Qbasic Code (I want to show you guys what I did)
Posted: Tue Jul 11, 2006 8:20 pm
by neo
Thank you, I will.

(once I type it ALL over again in Notepad)
Re: My Qbasic Code (I want to show you guys what I did)
Posted: Fri Jul 14, 2006 2:20 pm
by Romano
That's good.
But the last time I wrote in QBASIC was 2 or 3 years ago, so i don't understand everything.

Re: My Qbasic Code (I want to show you guys what I did)
Posted: Fri Jul 14, 2006 7:20 pm
by neo
Thank you, I will post more code shortly.

Re: My Qbasic Code (I want to show you guys what I did)
Posted: Sat Jul 15, 2006 3:55 am
by Hunchman801
Neo's first code was very simple so anyone with a little programming skills could understand it ^^
Re: My Qbasic Code (I want to show you guys what I did)
Posted: Sat Jul 15, 2006 7:03 pm
by neo
REM Binary Bandits
REM Carlos Matos
REM 8/11/06
'
REM Input
LET Player1$ = "Atwill"
LET Player2$ = "Putney"
LET Player3$ = "Jordan"
LET num = 3
LET num2 = 2
LET Pl13pt = 2
LET Pl12pt = 6
LET Pl1FT = 5
LET Pl23pt = 5
LET Pl22pt = 3
LET Pl2FT = 4
LET Pl33pt = 2
LET Pl32pt = 4
LET Pl3FT = 3
'
REM Proccessing
LET Player1TT = Pl13pt * num + Pl12pt * num2 + Pl1FT
LET Player2TT = Pl23pt * num + Pl22pt * num2 + Pl2FT
LET Player3TT = Pl33pt * num + Pl32pt * num2 + Pl3FT
'
REM output
CLS
COLOR 14, 4
PRINT , "Binary Bandits"
COLOR 15, 2
PRINT "Player", "2-Pointer", "3-Pointer", "Free Throws", "Total"
COLOR 14, 1
PRINT Player1$, Pl13pt, Pl12pt, Pl1FT, Player1TT
PRINT Player2$, Pl23pt, Pl22pt, Pl2FT, Player2TT
PRINT Player3$, Pl33pt, Pl32pt, Pl3FT, Player3TT
END
Re: My Qbasic Code (I want to show you guys what I did)
Posted: Sat Jul 15, 2006 11:29 pm
by Phoenixan
Nice.
In my programming classes, I've only worked with Visual Basic and C. Myself and WiNg0o on ROSAF even worked together and built a multiplayer platform shooter game, though it wasn't exactly as great as we hoped it'd turn out.
WiNg0o, "...and all of this, and we come to think that for our final projects, we could have just made tic-tac-toe."
Re: My Qbasic Code (I want to show you guys what I did)
Posted: Mon Jul 17, 2006 3:13 pm
by neo
Wow, I think thats beyond the scope of the course I'm taking.

I am interested in learning Visual Basic, C, and Java.

Re: My Qbasic Code (I want to show you guys what I did)
Posted: Mon Jul 17, 2006 4:08 pm
by Hunchman801
You can program tic-tac-toes (crosses and noughts) with JavaScript too... Well, I have learned programming by myself, I have never been taught it at school.
Re: My Qbasic Code (I want to show you guys what I did)
Posted: Mon Jul 17, 2006 4:20 pm
by neo
Oh. all I could program so far are programs that calculate SOMETHING.

Re: My Qbasic Code (I want to show you guys what I did)
Posted: Mon Jul 17, 2006 5:14 pm
by Hunchman801
Well, I guess this is what you have to start with.
Re: My Qbasic Code (I want to show you guys what I did)
Posted: Mon Jul 17, 2006 6:21 pm
by neo
So, I guess this class is like a mere stepping stone up to a ledge which is computer programming XD.
Re: My Qbasic Code (I want to show you guys what I did)
Posted: Thu Aug 03, 2006 6:24 pm
by Fluffisnoterm
I used to programme on QBasic, but my programme was damaged and I had to delete it.
