desislava_topuzakova

03. Square Area

Oct 17th, 2021
640
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class SquareArea_03 {
  4.     public static void main(String[] args) {
  5.         //1. въведем страна на квадрата (цяло число)
  6.         //2. пресмятаме лицето на квадрата
  7.         //3. отпечатваме
  8.         Scanner scanner = new Scanner(System.in);
  9.         int side = Integer.parseInt(scanner.nextLine());
  10.         int area = side * side;
  11.         System.out.println(area);
  12.     }
  13. }
  14.  
RAW Paste Data