code.ashish.me

Atom feed

Recently added: 02 Count Of Subset Sum, 416 Partition Equal Subset Sum, 01 Subset Sum, 518 Coin Change 2, 983 Minimum Cost For Tickets

Print1Ton

/**
 * 
 * Ashish Patel
 * e: ashishsushilPatel@gmail.com
 * w: https://ashish.me
 *
 */

public class Print1ToN {

  static void func(int n){
    if(n == 0){
      return;
    }
    func(n-1);
    System.out.println(n);
  }
  public static void main(String[] args){
    func(10);
  }
}

Created 2021-10-19T00:57:26+01:00, updated 2021-10-19T10:51:48+01:00 · History · Edit