Hailstone Sequence
    Create a program that will ask the user for an input integer % output the hailstone sequence given the following conditions:
    
    if n is even, divide the given by 2 
    if n is odd, multiply it by 3 and add 1
    if n is one exit the program
    
    
    
    can someone give me a code for this? i really do not know
    
    public class Hailstone	{
    public static void main(int num){
    System.out.println(num);
    if(num <= 1){
    return;
    }
    if(num%2 == 0){
    hailstone(num / 2);
    }
    else{
    hailstone( (3* num) + 1);
    }
    }
    } 
    
    this is wrong lol.. kindly help thanks 
Hailstone Sequence
===

    Create a program that will ask the user for an input integer % output the hailstone sequence given the following conditions:
    
    if n is even, divide the given by 2 
    if n is odd, multiply it by 3 and add 1
    if n is one exit the program
    
    
    
    can someone give me a code for this? i really do not know
    
    public class Hailstone	{
    public static void main(int num){
    System.out.println(num);
    if(num <= 1){
    return;
    }
    if(num%2 == 0){
    hailstone(num / 2);
    }
    else{
    hailstone( (3* num) + 1);
    }
    }
    } 
    
    this is wrong lol.. kindly help thanks 