Square Series


package exam;

public class Program4 {
 public static void main(String[] args) {
  int n=5;
  for(int i=1;i<=n;i++) {
   System.out.print(" " +(i*i));
  }
 }

}



o/p:-
 1 4 9 16 25