Write a program to print the square of a numbers 2 to 6
Answers
Answered by
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