Dostępna jest zmienna liczba. Napisz program, który wyświetla kwadrat tej zmiennej: (liczba * liczba).
Wymagania:
Nie modyfikuj zmiennej liczba. Możesz zmieniać tylko jej wartość.
Program powinien wyświetlać tekst.
Wyświetlony tekst musi być liczbą.
Wyświetlony tekst musi być kwadratem zmiennej liczba.
package pl.codegym.task.task01.task0140;
/*
Wyświetl kwadrat liczby
*/
public class Solution {
public static int liczba = 2;
public static void main(String[] args) {
System.out.println(2 * 2);
}
}
You should print out the square number of liczba. In your programme if liczba = 5 for example the programme would still output 4.
+1
This website uses cookies to provide you with personalized service. By using this website, you agree to our use of cookies. If you require more details, please read our Terms and Policy.