package com.codegym.task.task01.task0127;
/*
Square of a number
*/
public class Solution {
public static void main(String[] args) {
//write your code here
System.out.println(sqr(5));
}
public static int sqr(int a) {
int b = a*a;
return b;
}
}
Cant understand it??
Under discussion
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
hidden #10628226
4 June 2020, 22:21
All you need to do is write the code where it says. Leave the main metho alone and declare the variable a with a number :)
0
Brandon
14 May 2020, 22:29
"Don't change the sqr method."
Just reset it, and this time don't change anything within the "public static int sqr(int a)" method.
+3
Myko
9 November 2020, 11:24
Hi Brandon! I cann´t find it out how can I reset the task or initial code to try it again?
+1
Rica
4 March 2021, 02:03
Hi! How do you go about resetting it?
0