My Qbasic Code (I want to show you guys what I did)
Forum rules
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
Please keep the forum rules and guidelines in mind when creating or replying to a topic.
My Qbasic Code (I want to show you guys what I did)
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
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

- Posts: 87747
- Joined: Thu Aug 07, 2003 6:50 pm
- Location: Paris, France
- Contact:
- Tings: 640597
Re: My Qbasic Code (I want to show you guys what I did)
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)
Yep, thats what I'm learning in Computer Programming class. 
-
Hunchman801

- Posts: 87747
- Joined: Thu Aug 07, 2003 6:50 pm
- Location: Paris, France
- Contact:
- Tings: 640597
Re: My Qbasic Code (I want to show you guys what I did)
Then feel free to post here everything you code 
Re: My Qbasic Code (I want to show you guys what I did)
Thank you, I will.
(once I type it ALL over again in Notepad)
-
Romano

- 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)
That's good.
But the last time I wrote in QBASIC was 2 or 3 years ago, so i don't understand everything.
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)
Thank you, I will post more code shortly. 
-
Hunchman801

- Posts: 87747
- Joined: Thu Aug 07, 2003 6:50 pm
- Location: Paris, France
- Contact:
- Tings: 640597
Re: My Qbasic Code (I want to show you guys what I did)
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)
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
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)
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."
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)
Wow, I think thats beyond the scope of the course I'm taking. 
I am interested in learning Visual Basic, C, and Java.
I am interested in learning Visual Basic, C, and Java.
-
Hunchman801

- Posts: 87747
- Joined: Thu Aug 07, 2003 6:50 pm
- Location: Paris, France
- Contact:
- Tings: 640597
Re: My Qbasic Code (I want to show you guys what I did)
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)
Oh. all I could program so far are programs that calculate SOMETHING. 
-
Hunchman801

- Posts: 87747
- Joined: Thu Aug 07, 2003 6:50 pm
- Location: Paris, France
- Contact:
- Tings: 640597
Re: My Qbasic Code (I want to show you guys what I did)
Well, I guess this is what you have to start with.
Re: My Qbasic Code (I want to show you guys what I did)
So, I guess this class is like a mere stepping stone up to a ledge which is computer programming XD.
-
Fluffisnoterm

- 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)
I used to programme on QBasic, but my programme was damaged and I had to delete it. 

