Computer Science, asked by dishant4, 1 year ago

generate this series 1,4,9,.....n in java

Answers

Answered by MacTavish343
1
hell. ...ooo...!!!

class series
{
public static void main(String[]args)
{

int i,j; for(i=1; i<=n; i++)
{
j=i*i; System.out.println(j);
}
}
}

hope this helps you....!!!
Answered by siddhartharao77
0
public class Series
{
      public static void main(String[] args)
{
        int a;
        for(int a=1; a<=n; a++)
{
       System.out.print(a*a + "  " );
      }
     System.out.println(" ");
    }}  

siddhartharao77: Thank You So Much For the Brainliest..
Similar questions