Programs 




Navigation


-Home

-Math/Science
   -Primes

-Computer Programming

-Opinions

-Links

-About Me

-Guestbook
   -View
   -Sign



     This is, rather obviously, my page of programs. Many of the programs I write have to do with math somehow; it's really just my field of interest. In any case, most of these programs are somewhat useful or at least interesting. Only the source code will be here so far; you'll need a compiler if you want to run the program.

     My current "project" is learning some PHP. I still have all the stuff for the pi finder, but I haven't worked on it in a while.

C++

Don't worry about the ".cpp" ending, that's just the one my compiler uses- it'll load fine on browsers and is really just a text file.

  • Average Randoms Program To understand this program, you should link to the Math section.
  • Combinations Program This is a program for finding the number of combinations or permutations of two sets. Careful though, it can't handle big numbers.
  • Factor Program Will prime-factorize the input number.
  • FOIL Program This nearly useless program will FOIL a pair of binomials of the form ax + by. I don't even know why I have it up.
  • Fibonacci Program This demonstrates some interesting properties of Fibonacci numbers- namely, the fact that they relate to the Golden Ratio.
  • Improper Integral Program This simply demonstrates that the improper integral of e^x from negative infinity to 2 = e^2.
  • Special Number Tester A 4-digit special number is one where with digits abcd, (ab + cd)^2 = abcd.
  • Special Tester 2 A slightly improved version of the above program.
  • Perfect Number Tester This program tests whether a number is perfect, abundant, or deficient.
  • Perfect Tester 2 This vastly improved version allows you to test a range of numbers to find perfects. (Note: there are superior ways of finding perfect numbers. This, however, just uses the definition.)
  • Pascal's Triangle This program (my first with dynamic arrays) will print a Pascal's Triangle with a specified number of rows.
  • Pi finder This program uses trigonometric identities to compute the value of pi. Unfortunately, the accuracy isn't perfect. I wrote this one for the math.
  • Prime Tester This program tests for prime numbers in a range of values and prints them to the screen. I need to upload the better version now.
  • Prime Tester 2 This program does the same thing, except it writes the numbers to a file called "primenum.txt". This is how I made my lists of prime numbers on the Math page. This is probably about as streamlined as I can get it (originally processing many large numbers was not a priority). Simple stuff. (Note: This, too, operates straight from the definition without attempting to streamline the algorithm itself, which is quite possible.)
  • Quadratic Formula This simple program does the quadratic formula.

     A while ago, I worked on a class to handle fractions. I don't really have any reason to do so except practice, but here it is.

     Fraction.h Version 0.5 Fraction.cpp Version 0.5 These are the two files for my "0.5" version of the class. Essentially, this is pretty primitive; it just holds positive improper fractions. However, I posted it because I nearly guarantee it to work.
     Fraction.h Current Version Fraction.cpp Current Version This is the current version. It's better but not as thoroughly tested yet.
     Right now the current version has been upgraded to deal with signs. Hopefully coming soon:
  • An integer part to make it a mixed fraction
  • Something to deal with 0 input for the denominator (actually, maybe I'll just let the programmer handle that)
  • An output function
  • Maybe, someday, a bigger class to hold the numer and denom values, so I'm not restricted by the long int size.
     In any case, that's for the future. If I ever get around to working on this again.

Visual Basic

     Let's just say that I've written some stuff in Visual Basic and I don't plan on putting it up anytime soon. It's not high on my priority list for the web site.

HTML/JavaScript

     It's kind of funny that JavaScript is sort of a combination of HTML, C++, and Visual Basic all in one... it hasn't been too hard for me to pick up. Everything significant that I ever wrote in either HTML or JavaScript is in these pages somewhere. Look out for the two prime programs especially.



Want to get in touch with me? My email is falcon112358@lycos.com.
Carl Staab, © 2001


Site hosted by Angelfire.com: Build your free website today!