AlgodooJavaHead's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
2 (0 per day)
Joined:
20-March 12
Profile Views:
38
Last Active:
User is offline Mar 29 2012 10:24 AM
Currently:
Offline

Previous Fields

Dream Kudos:
0
Icon   AlgodooJavaHead has not set their status

Posts I've Made

  1. In Topic: HailStone.java (window wrapping)

    Posted 22 Mar 2012

    Sorry. Here it is. :)
    
    import java.util.Scanner;
    
    public class HailStone2 {
        static Scanner MyScanner = new Scanner(System.in);
        public static void main(String[] args) {
            System.out.println("This program will generate the HailStone Sequence. ");
            System.out.println("Enter a number: ");
            int num = MyScanner.nextInt();
            while(num > 1) {
                if (num%2 == 0) {
                    num /= 2;
                    System.out.print(num + "\t");
                }
                else
                {
                    num = (num * 3) + 1;
                    System.out.print(num + "\t");
                    
                }
            }
        }
    }
    
    

My Information

Member Title:
New D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

AlgodooJavaHead hasn't added any friends yet.

Comments

AlgodooJavaHead has no profile comments yet. Why not say hello?