To calculate the square and cube of any number
Answers
Answered by
0
square=multiply the number by itself ex 2×2=4
cube=multiply the number three times 3×3×3=27
Answered by
1
Answer:
In java.
class number
{
void main (int n)
{
int s=(int)Math.pow (n,2);
int c=(int)Matheson.pow (n,3);
System.out.println(s+" "+c);
}
}
Explanation:
Similar questions
Hindi,
5 months ago
English,
5 months ago
India Languages,
11 months ago
Political Science,
11 months ago
Math,
1 year ago
Math,
1 year ago