public class parameterExample  {
    public static void main (String[] args) {
        int ruff = 10;
        dogYears (20);
        dogYears (7);
        dogYears (12);
         //  this wasn't talked in class but could be useful for extra credit
        dogYears (ruff);
    }
    public static void dogYears (int human_years) {
        int dog_years;
        dog_years = human_years * 7;
        System.out.println (dog_years);
    }
}
No comments:
Post a Comment