Write a java program to print square of all numbers from 1 to 15
Answers
Answered by
1
class Square
{ int a;
public void calc()
{ for(int b=1;b<=15;b++)
{ a=b*b;
System.out.println("Square of"+b+"="+a);
}
}
}
Similar questions