1. make a recursive Fib function.
2. trace through the six recursive functions from 10/28/09
Thursday, October 29, 2009
Thursday, October 22, 2009
Lab 12
trace of factors program on web site |
factors program which really prints out all the factors |
REPT function |
trace of functions to draw diamond pattern |
Tuesday, October 20, 2009
Thursday, October 15, 2009
Lab 10
1) write a function which prints out all the FACTORS of a number
2) write a function which will return the SUM of its arguments
3) write a function which will return whether a number ISEVEN
4) write a function which will return whether a given year is a LEAPYEAR
5) write a function which will take in a fahrenheit number and return the celsius
6) According to Plato, the ideal age of a wife is half the age of the husband plus 7 years. write a function which will calculate this "ideal" age for the wife, given the husband's age.
2) write a function which will return the SUM of its arguments
3) write a function which will return whether a number ISEVEN
4) write a function which will return whether a given year is a LEAPYEAR
5) write a function which will take in a fahrenheit number and return the celsius
6) According to Plato, the ideal age of a wife is half the age of the husband plus 7 years. write a function which will calculate this "ideal" age for the wife, given the husband's age.
Thursday, October 8, 2009
Lab 9
HW and Lab
1) Write a program which plays higher / lower with you, where you are the guesser. Use random numbers for this.
2) Write a program which plays higher / lower with you, where the computer is the guesser. Use random numbers for this.
3) Write a multi-player game of Trouble. Here is the board. Here are the rules.
include "windows.h"
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 10);
1) Write a program which plays higher / lower with you, where you are the guesser. Use random numbers for this.
2) Write a program which plays higher / lower with you, where the computer is the guesser. Use random numbers for this.
3) Write a multi-player game of Trouble. Here is the board. Here are the rules.
include "windows.h"
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 10);
Tuesday, October 6, 2009
Lab 8
Submission Form:
Give me traces of the following programs:
Write a program that will print an X inside a square.
Give me traces of the following programs:
- Triangle pattern: nested for loop 09-30-09
- Downward Triangle pattern: nested for loop 09-30-09
- Arrow pattern: nested for loop 10-05-09
- Cross pattern: nested for loop 10-05-09
- Sums of cubes: nested for loop 10-05-09
- Print numbers with a given digit sum 10-05-09
Write a program that will print an X inside a square.
Thursday, October 1, 2009
Subscribe to:
Posts (Atom)