Teacher risha

Display the square of a number

  • 1
  • Locked
  • Exercise
First impressions are rarely the best, but they are certainly what we remember for the rest of our lives. We're talking about programming, in case you were wondering. In this task, we will try to calculate the square of a number, display it on the screen, and also use the ability to read data from the keyboard (the user will enter the number while the program is running).
You can't complete this task, because you're not signed in.
Comments (41)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
RaviLevel 6 , Madhubani
19 August, 08:47
SpectacularLevel 4
19 July, 11:42
I found the requirement "The program should output text." misleading. It made me think a String result was required, while an integer was accepted.
Sam Idris Level 1 , Kumasi
9 July, 10:42
Pranjal sharmaLevel 2 , Gurgaon
6 July, 08:08
public static void main(String[] args) int number=2; system.out.println(number*number); whats wrong in this??
PhuongLevel 3 , Melbourne
6 July, 19:20
system needs to be System (capital S)
Colin McKayLevel 2 , Buffalo
13 August, 13:03
it says don't change the variable int number = 25;
ousi4ousLevel 2 , Douala
6 April, 20:07
I have difficulties in getting this one done
AibohphobiaLevel 1 , Fort Campbell
25 March, 02:14
Something jumped over subject matter; this lesson is covering material that was never discussed as of yet?
PhuongLevel 3 , Melbourne
6 July, 19:22
Not really, its still all variables and output, and how to concatenate (chain/link) them together
stjepangLevel 8 , Sveti Iija
21 March, 05:34
what means message: "Missing a Javadoc comment.: Solution.java, line:11, column:5 ???
RomanLevel 41
21 March, 07:26
Read about javadoc.
stjepangLevel 8 , Sveti Iija
26 March, 04:29
Thanks a lot Roman. :)).
SushantLevel 4 , goa
28 February, 06:06
just multiply this (number) to the same number variable . u will find the solution. keep coding keep sharing .
YohannesLevel 1 , Bellevue
22 February, 21:45
So far so good.i want to continue to the next lesson.
ruhLevel 2 , Indore
16 February, 07:21
what was wrong in this program please help me ......
RomanLevel 41
18 February, 06:43
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.