PDA

View Full Version : practice




phiber optik
Jul 8, 2006, 04:54 PM
Hey all
I'm going to attend a computer camp that will deal heavily with programming in C++, and i desperatly need to brush up on my programming skills. Can people provide some little project ideas so i can get back into programming and be ready for my camp?
(stuff like printing the fibonacci sequence or other math stuff, if youre confused as to what im asking)
thanks for any input asap!
-phiber



Eraserhead
Jul 8, 2006, 06:49 PM
From your Fibonacci example from some similar exercises for Fortran (it's a long story) and Java course from last year

Print the first n terms of the Fibonacci sequence

Print the terms of the Fibonacci sequence up to n

Print the first n lines of Pascal's triangle

Print the first n prime numbers

For an entered value of x calculate 1/(x+1) when x=-1 (as 1/0 is undefined) it should produce an error and ask for a new value of x.

Convert a temperature from Fahrenheit to Celsius and back again.

Solve a quadratic ax^2+bx+c=0 with a,b,c known.

Find the greatest common divisor of two numbers (more info here (http://en.wikipedia.org/wiki/Greatest_common_divisor))

slooksterPSV
Jul 8, 2006, 08:32 PM
Ooh, here's one that made me think:
Try this one: (SEE IMAGE). I'll compute the answer: