Mahmoud_Hawara

PA07-1

Dec 30th, 2025
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. public class Main {
  2.    
  3.     public static void countDown(int n) {
  4.         if (n == 0) {
  5.             System.out.println("Blastoff!");
  6.             return;
  7.         }
  8.         System.out.println(n);
  9.         countDown(n - 1);
  10.     }
  11.    
  12.     public static void main(String[] args) {
  13.         countDown(6);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment