Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 coin flip program for school project
Index -> Programming, Turing -> Turing Submissions
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
DanShadow




PostPosted: Tue Dec 16, 2003 12:00 pm   Post subject: (No subject)

Oh...well I told Dan. I thought the database couldnt be connected to because he was fixing it or something, lol.
Sponsor
Sponsor
Sponsor
sponsor
Kuntzy




PostPosted: Tue Dec 16, 2003 11:06 pm   Post subject: (No subject)

This is the penny i made b4 inew bout arrays lol


View.Set ("graphics:500;401,offscreenonly")
var x := 200
var y := 200
var xc := 200

var x2 : real := 180
var x3 : real := 182
var x4 : real := 184
var x5 : real := 186
var x6 : real := 188
var x7 : real := 190
var x8 : real := 192
var x9 : real := 194
var x10 : real := 196
var x11 : real := 198

var y2 : int := 200

var m := 1
var m2 : real := 1
var m3 : int := 1
var m4 : int := 1
var m5 : int := 1
var m6 : int := 1
var m7 : int := 1
var m8 : int := 1
var m9 : int := 1
var m10 : int := 1
var m11 : int := 1

var i := 0

loop


drawoval (230, 200, x, y, red)
drawline (230, 200, x + 230, y, red)
drawline (230, 200, 230 - x, y, red)
drawline (230, 200, 230, 200 + y, red)
drawline (230, 200, 230, 200 - y, red)

drawoval (230, 200, round (x2), y2, red)
drawoval (230, 200, round (x3), y2, red)
drawoval (230, 200, round (x4), y2, red)
drawoval (230, 200, round (x5), y2, red)
drawoval (230, 200, round (x6), y2, red)
drawoval (230, 200, round (x7), y2, red)
drawoval (230, 200, round (x8), y2, red)
drawoval (230, 200, round (x9), y2, red)
drawoval (230, 200, round (x10), y2, red)
drawoval (230, 200, round (x11), y2, red)


drawline (230, 200, round (x2 + 230), y2, red)
drawline (230, 200, round (230 - x2), y2, red)
drawline (230, 200, 230, 200 + y2, red)
drawline (230, 200, 230, 200 - y2, red)

drawline (230, 200, 230 + round (x * cosd (i)), 200 + round (y * sind (i)), red)
drawline (230, 200, 230 + round (x2 * cosd (i)), 200 + round (y * sind (i)), red)
drawline (230, 200, 230 - round (x * cosd (i)), 200 + round (y * sind (i)), red)
drawline (230, 200, 230 - round (x * cosd (i)), 200 - round (y * sind (i)), red)
drawline (230, 200, 230 + round (x * cosd (i)), 200 - round (y * sind (i)), red)
drawline (230, 200, 230 - round (x2 * cosd (i)), 200 + round (y * sind (i)), red)
drawline (230, 200, 230 - round (x2 * cosd (i)), 200 - round (y * sind (i)), red)
drawline (230, 200, 230 + round (x2 * cosd (i)), 200 - round (y * sind (i)), red)

drawline (230, 200, 230 + round (x * cosd (i + 90)), 200 + round (y * sind (i + 90)), red)
drawline (230, 200, 230 + round (x * cosd (i + 180)), 200 + round (y * sind (i + 180)), red)
drawline (230, 200, 230 + round (x * cosd (i + 270)), 200 + round (y * sind (i + 270)), red)
drawline (230, 200, 230 + round (x * cosd (i + 360)), 200 + round (y * sind (i + 360)), red)

drawline (230, 200, 230 + round (x2 * cosd (i + 90)), 200 + round (y * sind (i + 90)), red)
drawline (230, 200, 230 + round (x2 * cosd (i + 180)), 200 + round (y * sind (i + 180)), red)
drawline (230, 200, 230 + round (x2 * cosd (i + 270)), 200 + round (y * sind (i + 270)), red)
drawline (230, 200, 230 + round (x2 * cosd (i + 360)), 200 + round (y * sind (i + 360)), red)

drawline (230, 200, 230 - round (x * cosd (i + 90)), 200 + round (y * sind (i + 90)), red)
drawline (230, 200, 230 - round (x * cosd (i + 180)), 200 + round (y * sind (i + 180)), red)
drawline (230, 200, 230 - round (x * cosd (i + 270)), 200 + round (y * sind (i + 270)), red)
drawline (230, 200, 230 - round (x * cosd (i + 360)), 200 + round (y * sind (i + 360)), red)

drawline (230, 200, 230 - round (x2 * cosd (i + 90)), 200 + round (y * sind (i + 90)), red)
drawline (230, 200, 230 - round (x2 * cosd (i + 180)), 200 + round (y * sind (i + 180)), red)
drawline (230, 200, 230 - round (x2 * cosd (i + 270)), 200 + round (y * sind (i + 270)), red)
drawline (230, 200, 230 - round (x2 * cosd (i + 360)), 200 + round (y * sind (i + 360)), red)

x -= m
x2 -= m2
x3 -= m3
x4 -= m4
x5 -= m5
x6 -= m6
x7 -= m7
x8 -= m8
x9 -= m9
x10 -= m10
x11 -= m11

i += 1

if x < -200 then
m := -m
elsif x > 200 then
m := -m
end if
if x2 < -200 then
m2 := -m2
elsif x2 > 200 then
m2 := -m2
end if
if x3 < -200 then
m3 := -m3
elsif x3 > 200 then
m3 := -m3
end if
if x4 < -200 then
m4 := -m4
elsif x4 > 200 then
m4 := -m4
end if
if x5 < -200 then
m5 := -m5
elsif x5 > 200 then
m5 := -m5
end if
if x6 < -200 then
m6 := -m6
elsif x6 > 200 then
m6 := -m6
end if
if x7 < -200 then
m7 := -m7
elsif x7 > 200 then
m7 := -m7
end if
if x8 < -200 then
m8 := -m8
elsif x8 > 200 then
m8 := -m8
end if
if x9 < -200 then
m9 := -m9
elsif x9 > 200 then
m9 := -m9
end if
if x10 < -200 then
m10 := -m10
elsif x10 > 200 then
m10 := -m10
end if
if x11 < -200 then
m11 := -m11
elsif x11 > 200 then
m11 := -m11
end if
delay (10)
View.Update
cls
end loop
shorthair




PostPosted: Wed Dec 17, 2003 11:01 pm   Post subject: (No subject)

Whats wrong with this page , is it the forum or is it his picture
icemaster




PostPosted: Thu Jan 15, 2004 10:22 pm   Post subject: (No subject)

wow Kuntzy you really need to make use of the code command when you post your code, then ppl might read you code....
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 19 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: