Computer Science, asked by sreya8152, 8 months ago

Write a program to print the square of a numbers 2 to 6​

Answers

Answered by tonystarkironman94
1

Answer:

in java script:

import java.util.*;

class Square

{

public static void main (String args[ ])

{

Scanner sc =new Scanner (System.in);

int s=0;

for(int i=2;i<=6;i++)

{

s=s+Math.pow(i,2);

}

System.out.println("Series of square="+s);

}

}

mark me as brainlist

Similar questions