AlgodooJavaHead's Profile
Reputation: 0
Apprentice
- Group:
- New Members
- Active Posts:
- 2 (0 per day)
- Joined:
- 20-March 12
- Profile Views:
- 38
- Last Active:
Mar 29 2012 10:24 AM- Currently:
- Offline
Previous Fields
- Dream Kudos:
- 0
Posts I've Made
-
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.
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
AlgodooJavaHead has no profile comments yet. Why not say hello?