Free help with homework

Why join Brainly?

  • ask questions about your assignment
  • get answers with explanations
  • find similar questions


1-take a number from user and store it in "n"
2-then take another variable, let it be "p"
3- then put p=n*n
4-print p
0 0 0
It's better to use Math.pow(2,int); or Math.pow(int,2); for java.
0 0 0
The Brain
  • The Brain
  • Helper
Not sure about the answer?
Learn more with Brainly!
Having trouble with your homework?
Get free help!
  • 80% of questions are answered in under 10 minutes
  • Answers come with explanations, so that you can learn
  • Answer quality is ensured by our experts