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

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




PostPosted: Tue Mar 02, 2010 11:27 am   Post subject: calculating pi

need help getting a program to = pi usin
15.7= 3.14*5
where 3.14 is a variable and
15.7/5



pi.t
 Description:

Download
 Filename:  pi.t
 Filesize:  36 Bytes
 Downloaded:  88 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Tue Mar 02, 2010 11:38 am   Post subject: RE:calculating pi

Moved to turing help. Please post in the right section.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
DemonWasp




PostPosted: Tue Mar 02, 2010 11:40 am   Post subject: RE:calculating pi

Have you seriously not learned assignment yet? Here's how an assignment statement works (assigning a variable a new value):

code:

(variable to set) := (new value, probably a calculation)


So what you want to do is:

code:

a := 15.70796327/5


not

code:

15.70796327/5=a
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  [ 3 Posts ]
Jump to:   


Style:  
Search: