daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Ch12 {
  2.     public static void main(String[] args){
  3.         writeStars(25);
  4.  
  5.     }
  6.     public static void writeStars(int n){
  7.         if (n == 0){
  8.             // base case
  9.             System.out.println();
  10.         } else {
  11.             // recursive case
  12.             System.out.print("*");
  13.             writeStars(n - 1);
  14.         }
  15.     }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top