Difference between revisions of "CSC103 2011 Take-Home Final Exam"
Line 38: | Line 38: | ||
− | =Problem #2= | + | =Problem #2: Assembly= |
− | * Write an assembly language program that | + | * Write an assembly language program that uses ten memory locations (variables) filled with 0, starting at Address 30, and that stores the values 2, 4, 8, 10, 12, 14, 16, 18, 20, and 22 in them. Your program will store 2 at Address 30, 4 at address 31, 6 at address 32, etc. |
− | * Your program should contain | + | * Your program should contain the following lines to initialize the ten memory locations |
@30 | @30 | ||
Line 57: | Line 57: | ||
* Your program must use a loop. | * Your program must use a loop. | ||
− | * Use the [[CSC103_2011_Homework_3_Solution | | + | * Use the [[CSC103_2011_Homework_3_Solution | solution programs]] for Homework #3 as examples of good formats and good documentation. |
+ | * You are encouraged to use labels, as they make the programs more readable, but if you prefer not to use labels, you will not be penalized. | ||
− | =Problem #3= | + | =Problem #3: Javascript= |
− | * Write a javascript program that computes the sum of all the even numbers between 0 and 100, 100 included, and stores the result in a variable called sumEven. The same program will also compute the sum of all the multiples of 5 between 0 and 100, 100 included. This second number will be stored in a variable called sum5. | + | * Write a '''javascript''' program that computes the sum of all the even numbers between 0 and 100, 100 included, and stores the result in a variable called '''sumEven'''. The same program will also compute the sum of all the multiples of 5 between 0 and 100, 100 included. This second number will be stored in a variable called '''sum5'''. |
− | * Use the programs from the [[CSC103_Lab_4_Solution_2011| Lab 4 solution]] | + | * Use the programs from the [[CSC103_Lab_4_Solution_2011| Lab 4 solution]] page for inspiration in terms of organization and documentation. |
=Problem #4: Essay= | =Problem #4: Essay= |