We need to tell the computer how much memory will be needed to store the value in question. Looking at step 1 in the program above, we will need to tell the computer that it needs to remember the value it is reading in - it needs to store this value in its memory somewhere so we can use it in a computation later. Remember: a computer will read and act upon these instructions one at a time - it is not aware of what is coming up until it gets there! Print the area to the standard output stream (i.e., the console window) Read a value representing the radius of a circle from the standard input source/streamĬompute the area of a circle with this radius You can think of a simple program as a list of instructions to be read and acted upon sequentially The Purpose of a Variable (and some vocabulary)
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |