0 index
1 Store a value
2 Store in a named cell
3 Simple adder
4 Decrement startval
5 Improved counter
6 Count by threes
7 Multiplier

outline
created using slideshow.cgi by Andy Harris















CSCI N301 Fundamental CS Concepts: n301/cs16xComputerChallenges
1. Store a value
  • Store the value 10 in cell 50



































CSCI N301 Fundamental CS Concepts: n301/cs16xComputerChallenges
2. Store in a named cell
  • Store the value 10 in a cell named target



































CSCI N301 Fundamental CS Concepts: n301/cs16xComputerChallenges
3. Simple adder
  • Given cells a, b, and result, write a program that adds a and b, and puts answer in result



































CSCI N301 Fundamental CS Concepts: n301/cs16xComputerChallenges
4. Decrement startval
  • Given a value in a cell called startval, decrease that value by one as many times as necessary until the value is zero.



































CSCI N301 Fundamental CS Concepts: n301/cs16xComputerChallenges
5. Improved counter
  • Given a value in a cell called startval, loop as many times as necessary for startval to get to zero (as in last program). Have another cell named counter. At the end of the run, counter should contain the number of repetitions that occurred.



































CSCI N301 Fundamental CS Concepts: n301/cs16xComputerChallenges
6. Count by threes
  • Improve the last program so by the end of the run, it shows three times the number of repetitions that occurred



































CSCI N301 Fundamental CS Concepts: n301/cs16xComputerChallenges
7. Multiplier
  • Given cells a, b, and product, write a program that multiplies a times b and stores the result into product.



































outline

Store a value

Store in a named cell

Simple adder

Decrement startval

Improved counter

Count by threes

Multiplier