quiz10 - sum, n The variables used in the code represented...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Programmers using an OOP approach concentrate on creating their own user-defined types called: classes world.my first method ( ) sum = 0 , n = 1 While ( n <= 3 ) sum set value to ( ( ( ( sum * sum ) ) + n ) ) n set value to ( ( n + 1 ) ) print sum The following variables have been used in the code represented in Figure 1:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sum, n The variables used in the code represented in Figure 1 are of the following type: number If the code in Figure 1 is executed, the output will be: 12 The code shown in Figure 1 contains the following types of control structures: sequence and repetition only...
View Full Document

This note was uploaded on 10/02/2008 for the course ENGE 1024 taught by Professor Dcohanehi during the Fall '06 term at Virginia Tech.

Ask a homework question - tutors are online