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

Username:   Password: 
 RegisterRegister   
 First Program Hope Its Good!!
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
How U Doin




PostPosted: Tue Oct 26, 2004 8:27 am   Post subject: First Program Hope Its Good!!

This is my first program guys I hope you like it!

code:

var happy : int
var x : int
var y : int
var dx : int
var dy : int
var cont : string (1)
var c : int
setscreen ("graphics:640;480,nocursor,offscreenonly")

x := 0
y := 0

dx := 1
dy := 1


drawoval (200, 200, 25, 25, 1)
drawfilloval (200, 200, 2, 2, 1)
drawfilloval (190, 210, 3, 3, 1)
drawfilloval (210, 210, 3, 3, 1)
drawfillarc (200, 190, 15, 10, 180, 0, 1)
happy := Pic.New (170, 170, 230, 230)

cls

loop
    x := x + dx
    y := y + dy
    Pic.Draw (happy, x, y, picCopy)
    Pic.Draw (happy, x, y, picCopy)
    View.Update
    % View.Update

    if x <= 0 then
        dx := 1
    elsif x >= maxx - 60 then
        dx := -1
    end if
    if y <= 0 then
        dy := 1
    elsif y >= maxy - 60 then
        dy := -1
    end if
exit when hasch
end loop
getch(cont)
Sponsor
Sponsor
Sponsor
sponsor
djlenny_3000




PostPosted: Tue Oct 26, 2004 8:32 am   Post subject: (No subject)

is so kool, i will post a new version of it, seems a little kooler

code:
var happy : int
var x : int := 0
var y : int := 0
var dx : int := 1
var dy : int := 1
var cont : string (1)

setscreen ("graphics:640;480,nocursor,offscreenonly")



%draw the happy face

drawoval (200, 200, 25, 25, 9)
drawfilloval (200, 200, 2, 2, 9)
drawfilloval (190, 210, 3, 3, 9)
drawfilloval (210, 210, 3, 3, 9)
drawfillarc (200, 190, 15, 10, 175, 5, 9)

happy := Pic.New (170, 170, 230, 230)
cls
loop
    x := x + dx
    y := y + dy

    Pic.Draw (happy, x, y, picCopy)
    if x <= 0 then
        dx := Rand.Int(1,20)
    elsif x >= maxx - 60 then
        dx := Rand.Int(-20,-1)
    end if
    if y <= 0 then
        dy := Rand.Int(1,20)
    elsif y >= maxy - 60 then
        dy := Rand.Int(-20,-1)
    end if
    delay(2)
    View.Update
    exit when hasch
end loop

cls
getch (cont)


so funny, neways, all i have to say is poopie!!!!!
gigaman




PostPosted: Tue Oct 26, 2004 8:38 am   Post subject: mouse version

here i wrote a mouse version it's pretty good
code:

var happy : int
var x : int
var y : int
var but : int
var cont : string (1)

setscreen ("graphics:640;480,nocursor,offscreenonly")

x := 0
y := 0
but := 0

drawoval (200, 200, 25, 25, 1)
drawfilloval (200, 200, 2, 2, 1)
drawfilloval (190, 210, 3, 3, 1)
drawfilloval (210, 210, 3, 3, 1)
drawfillarc (200, 190, 15, 10, 170, 370, 1)


happy := Pic.New (170, 170, 230, 230)

cls
loop
   
    Pic.Draw (happy, x, y, picCopy)
    View.Update
    Mouse.Where (x, y, but)
    delay (10)
    cls
    exit when hasch     
    cls
    end loop
cls
getch (cont)     
How U Doin




PostPosted: Tue Oct 26, 2004 8:41 am   Post subject: (No subject)

I am learning as fast as I can, anyone suggest a good progging language to go to after Turing?
gigaman




PostPosted: Tue Oct 26, 2004 8:42 am   Post subject: (No subject)

1+2 even if you're not a good programmer don't worry it's not as hard as it seems. you'll get the hang of it
gigaman




PostPosted: Tue Oct 26, 2004 8:43 am   Post subject: (No subject)

how. if you want a good programming language after this i recommend Visual Basic.
josh




PostPosted: Tue Oct 26, 2004 8:44 am   Post subject: (No subject)

u guys are all pathetic spammers for bits. All these guys are the same 1's who did that other pathetic spam thing yesterday. Stop clogging the boards with this crap!!!!!!!!! Naughty
djlenny_3000




PostPosted: Tue Oct 26, 2004 8:45 am   Post subject: (No subject)

heres a simple program for you 1+2=4
code:

%this line is for the variable var declares it and name is the name of the %variable and string is the type
var name:string
%put something
put "what is your name"
get name %self explanatory

put "hi", name




cool eh
Sponsor
Sponsor
Sponsor
sponsor
How U Doin




PostPosted: Tue Oct 26, 2004 8:46 am   Post subject: (No subject)

I will try to go to VB after this... I hope I do good in it.

Wow this community is so nice !
djlenny_3000




PostPosted: Tue Oct 26, 2004 8:47 am   Post subject: (No subject)

i recomend visual basic to program but turing is still a good start
josh




PostPosted: Tue Oct 26, 2004 8:49 am   Post subject: (No subject)

well if u want to talk do it in the spam forum!!!!!!! or better yet, since u r all sitting right next 2 eachother do it there. And 1+2=4 and con3 zon3 and how u doin are all the same person!!!!!
josh




PostPosted: Tue Oct 26, 2004 8:51 am   Post subject: (No subject)

I am not even going to make another comment about this becuase it is pathetic Exclamation Exclamation Exclamation
gigaman




PostPosted: Tue Oct 26, 2004 8:51 am   Post subject: (No subject)

rhysticlight wrote:
u guys are all pathetic spammers for bits. All these guys are the same 1's who did that other pathetic spam thing yesterday. Stop clogging the boards with this crap!!!!!!!!! Naughty


rhystic that's a horrible thing to say. we are trying to help these noobs out. and you were a part of yesterday's stupidity also. i'm done with this though because frankly it is getting spammy
Dan




PostPosted: Tue Oct 26, 2004 12:45 pm   Post subject: (No subject)

Ok, just so poleop know what the hell was going on in this topic b4 i lock it, there was alot of spaming going on with i deleted for the topic and with compsci.ca's new rules as of awhile ago there is a "tax" on making me not be lazy and delete post so for every post i deleted there person who posted it lost 5 bits witch means thos spamers are now in the negtives.....
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
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 1 of 1  [ 14 Posts ]
Jump to:   


Style:  
Search: