JOURNAL: Machine (Carlos Corral)

  • Computer Science is not your friend 2002-10-21 22:38:30 import CSLib.*;

    /**
    * This program has 3 different tasks.
    *
    * 1. A prime number is evenly divisable only by 1 and itself
    returns true if the number is prime, otherwise false.

    2. Returns the nth fibonacci number.

    3. Prints the prime factors of the given number.

    * @author (Carlos Corral)
    * @version (10/21/02)
    */


    public class mathStuff{

    //A prime number is evenly divisable only by 1 and itself
    //returns true if the number is prime, otherwise false

    public boolean isPrime (int number){
    boolean prime = true;
    int Num1;

    Num1 = number;
    String e = ("Number must be greater than 1.");
    if (Num1 <= 1){
    System.out.println(e);
    return false;
    }

    while (Num1 > 2) {

    Num1 = Num1 - 1;

    if(number % Num1 == 0)
    prime = false;
    }
    return prime;
    }

    //returns the nth fibonacci number
    //see excercise 2 on page 208 for more details

    public int findFibo (int n){

    int num1 = 0;
    int num2 = 1;
    int num3 = 0;
    int counter = 2;

    while (counter < n){
    num3 = num1 + num2;
    num1 = num2;
    num2 = num3;
    counter++;
    }
    if (n == 1) {
    return 0;
    }

    if (n == 2){
    return 1;
    }

    return num3;

    }
    //prints the prime factors of the given number
    //for example, 34 = 2 * 17 or 36 = 2 * 2 * 3 * 3

    public void findFactors (int number) {
    int Num1, counter;
    Num1 = number;
    counter = 2;

    if (Num1 < 1){
    OutputBox out = new OutputBox("Error");
    out.println("That number does not work with this program");
    }
    else {
    OutputBox out = new OutputBox("Prime Factors");
    out.print(Num1 + " = 1");

    while (counter <= Num1) {
    while (Num1 % counter == 0) {
    out.print(" * " + counter);
    Num1 = (Num1 / counter);
    }
    counter++;
    }
    }
    }
    }





    The morale of this story....Computer Science is not your friend.
    This program alone took me about 2 1/2 hours to figure out completly.
    Logic portion of it was killing me. Code was easy.

    With the aid of Fluxmesiter of course, I was able to finish! Thank you Tim Stair for being a Computer Science Messiah! 
  • Another Short and Sweet 2002-10-15 23:56:15 Well, I managed to get my AWA Masters Music Video up for download.

    I apologize for not putting more time to the website everyone but right now college is my first priority and Computer Science is a very tough major.

    So for now, enjoy my AWA Master AMV.

    Several video are currently offline to due difficulties with providers. I will try to fix this ASAP. There are still some music videos that are up for download so all is not lost. That's all for now.


    PS, since these forums are currently down, come check out ours over at

    http://www.mindwarpet.com/forum/



    Slap-Disk Humor anyone??? 
  • Short and Sweet 2002-10-13 20:59:40 Well, I managed to get my AWA Masters Music Video up for download thanks to Jonathan.

    I apologize for not puttin gmroe time to the website everyone but right now college is my first priority and Computer Science is a very tough major.

    So for now, enjoy my AWA Master AMV. That's all for now.  
  • It's good to get away for a weekend 2002-09-23 20:55:34 Ok guys, I know most of you have wondered why our website was going up and down alot this last week. The answer is simple, we have switched web hosts and are now being hosted by my good friend Jonthan Watson of Random Variable Productions.


    Well, I'm off to Anime Weekend Atlanta for this coming weekend. I hope to meet several new AMV creators as well as some familiar faces as well. Be on the look out for the upcoming AWA Documentary as well as a new video from myself. My AWA Masters video will finally be made public. That's about it for now.


    Also, the spankin new MindWarp Forums are up and running! Check them out! Take care all!  
  • New update and New host! 2002-09-13 22:12:42 Ok guys, Mostly all of the broken links have been fixed and all of the MindWarp 2001 and 2000 anime music videos are now avaliable again. Some great news as well. The MindWarp Spring/Summer Contest winners are finally being hosted back on our website. Forgot who won the contest? Go and find out ^_^.

    Also, my brother has now released his new Inuyasha Anime Music Video. Finally after 2 years he decided to get off his ass and make something. Well that's pretty much it. The forums link is down right now because we are currently remodeling them. Other than that everything else is ok!  
Current server time: Jun 09, 2024 08:28:34