My Qbasic Code (I want to show you guys what I did)

For everything not related to either Rayman or Pirate-Community.
Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Post Reply
neo
General
Posts: 8780
Joined: Sun May 29, 2005 12:27 am
Tings: 80255

My Qbasic Code (I want to show you guys what I did)

Post 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
Hunchman801
Bad Rayman
Posts: 87741
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640567

Re: My Qbasic Code (I want to show you guys what I did)

Post by Hunchman801 »

This is a very simple code, but I should you should let people enter the values they want for lenghts ;)
neo
General
Posts: 8780
Joined: Sun May 29, 2005 12:27 am
Tings: 80255

Re: My Qbasic Code (I want to show you guys what I did)

Post by neo »

Yep, thats what I'm learning in Computer Programming class. :P
Hunchman801
Bad Rayman
Posts: 87741
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640567

Re: My Qbasic Code (I want to show you guys what I did)

Post by Hunchman801 »

Then feel free to post here everything you code ;)
neo
General
Posts: 8780
Joined: Sun May 29, 2005 12:27 am
Tings: 80255

Re: My Qbasic Code (I want to show you guys what I did)

Post by neo »

Thank you, I will. :P (once I type it ALL over again in Notepad)
Romano
Space Mama
Posts: 3954
Joined: Fri Aug 08, 2003 10:17 pm
Location: Aix-en-Provence, France
Contact:
Tings: 70724

Re: My Qbasic Code (I want to show you guys what I did)

Post 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. :oops2:
neo
General
Posts: 8780
Joined: Sun May 29, 2005 12:27 am
Tings: 80255

Re: My Qbasic Code (I want to show you guys what I did)

Post by neo »

Thank you, I will post more code shortly. :P
Hunchman801
Bad Rayman
Posts: 87741
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640567

Re: My Qbasic Code (I want to show you guys what I did)

Post by Hunchman801 »

Neo's first code was very simple so anyone with a little programming skills could understand it ^^
neo
General
Posts: 8780
Joined: Sun May 29, 2005 12:27 am
Tings: 80255

Re: My Qbasic Code (I want to show you guys what I did)

Post 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
Phoenixan
Ursula
Posts: 1802
Joined: Sun Dec 05, 2004 4:15 am
Contact:
Tings: 26333

Re: My Qbasic Code (I want to show you guys what I did)

Post by Phoenixan »

Nice. :P

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."
neo
General
Posts: 8780
Joined: Sun May 29, 2005 12:27 am
Tings: 80255

Re: My Qbasic Code (I want to show you guys what I did)

Post by neo »

Wow, I think thats beyond the scope of the course I'm taking. :D
I am interested in learning Visual Basic, C, and Java. :P
Hunchman801
Bad Rayman
Posts: 87741
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640567

Re: My Qbasic Code (I want to show you guys what I did)

Post 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.
neo
General
Posts: 8780
Joined: Sun May 29, 2005 12:27 am
Tings: 80255

Re: My Qbasic Code (I want to show you guys what I did)

Post by neo »

Oh. all I could program so far are programs that calculate SOMETHING. :lol:
Hunchman801
Bad Rayman
Posts: 87741
Joined: Thu Aug 07, 2003 6:50 pm
Location: Paris, France
Contact:
Tings: 640567

Re: My Qbasic Code (I want to show you guys what I did)

Post by Hunchman801 »

Well, I guess this is what you have to start with.
neo
General
Posts: 8780
Joined: Sun May 29, 2005 12:27 am
Tings: 80255

Re: My Qbasic Code (I want to show you guys what I did)

Post by neo »

So, I guess this class is like a mere stepping stone up to a ledge which is computer programming XD.
Fluffisnoterm
Monk
Posts: 90
Joined: Sat Jul 29, 2006 8:28 pm
Tings: 560

Re: My Qbasic Code (I want to show you guys what I did)

Post by Fluffisnoterm »

I used to programme on QBasic, but my programme was damaged and I had to delete it. :cry:
Post Reply