mmayoub

Ex03, 17.04.2021

Apr 20th, 2021
565
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //17.04.2021
  2. import java.util.Scanner;
  3.  
  4. public class Ex03 {
  5.  
  6.     public static void main(String[] args) {
  7.         // TODO Auto-generated method stub
  8.         Scanner in = new Scanner(System.in);
  9.         double a;
  10.         double msaha;
  11.         double moheet;
  12.  
  13.         System.out.print("Enter the length: ");
  14.         a = in.nextDouble();
  15.  
  16.         msaha = a * a;
  17.         moheet = 4 * a;
  18.  
  19.         System.out.println("area = " + msaha);
  20.         System.out.println("perimeter = " + moheet);
  21.  
  22.         in.close();
  23.     }
  24.  
  25. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×