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

Username:   Password: 
 RegisterRegister   
 integers
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
dymd3z




PostPosted: Wed Apr 25, 2007 8:52 am   Post subject: integers

I'm not a math person and I'm asked to do a certain question such as

The integer to variable x equals 1. Write the kine to increment x by 5.

That is all gibberish to me and I'm not sure what to do. Im think a "for" procedure and make it go "by 5" but then again, i dont understand math jargon and i could be completely wrong. anyone have some ideas?
Sponsor
Sponsor
Sponsor
sponsor
Drakain Zeil




PostPosted: Wed Apr 25, 2007 9:46 am   Post subject: RE:integers

x:=1
x:=x+5
ericfourfour




PostPosted: Wed Apr 25, 2007 11:28 am   Post subject: RE:integers

The += operator results in less typing.

x := 1
x += 5

It can be referred as an addition assignment operator.
Drakain Zeil




PostPosted: Wed Apr 25, 2007 9:49 pm   Post subject: RE:integers

Yeah, I was going to suggest it, but I'm thinking back to my grade 11 where only 2 students could comprehend +=, or other _= operators.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: