05_LabManual_ENG3202_Lab5 (4)
05_LabManual_ENG3202_Lab5 (4)
Questions
Table 6.1
Number (n) v1=3(n+n) v2=3(n+n)+n
0 0 0
1 6 7
2 12 14
3 18 21
4 24 28
5 30 35
6 36 42
7 42 49
8 48 56
9 54 63
10 60 70
2. Write a loop that will calculate the sum of every second integer, beginning
with i = 1 (i.e, calculate the sum 1+3+5+7+…) for all values of i that are less
than 250. Write the loop using a do.. while statement.