מטרת התרגול: לבדוק שליטה ביסודות התכנות (if, for, while, משתנים, קריאות לפונקציות, פעולות סטטיות) תוך כדי כניסה לרקורסיה.
public static void recur(int x) {
if (x <= 0)
return;
System.out.println(x);
recur(x - 1);
}
```java for (int i = 1; i <= n; i++) { System.out.println(i); }