recent

Java Program to print First N Natural Numbers using for loop

Java Program to print First N Natural Numbers using for loop
 /* Also For loop Example java*/
public class NaturalNumber {
  public static void main(String[] args) {
    int i,n;

    for (i = 1; i <= n; i++) {
      System.out.println(i);
    }
  }
}
Powered by Blogger.