Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java program to find perimeter of rectangle

Scanner sc = new Scanner(System.in);
System.out.println("Enter Width of the rectangle: ");
double width = sc.nextDouble();
System.out.println("Enter Height of the rectangle: ");
double height = sc.nextDouble();
sc.close();
// Logic for finding the perimeter of the rectangle
double perimeter = 2 * (width + height);
System.out.println("Perimeter of Rectangle: " + perimeter);
Comment

PREVIOUS NEXT
Code Example
Java :: java list to set 
Java :: java doreturn void 
Java :: Java How to use SortedMap? 
Java :: set scrollbar transparent jscrollpane 
Java :: convert string to byte java 
Java :: how to not open key board on start 
Java :: Copying Arrays Using copyOfRange() method Java 
Java :: how to instantiate hashmap in java 
Java :: reverse sentence in java 
Java :: kotlin enable and disable parents view children 
Java :: install java 8 arch 
Java :: create arraylist from array java 
Java :: java number 
Java :: how to check grant permissions in android 
Java :: java import joptionpane 
Java :: change color of action bar android studio 
Java :: java check how many digits in a number 
Java :: java 8 filter first 
Java :: java factorial loop 
Java :: print random from list java 
Java :: java charsequence to string 
Java :: android push notification icon 
Java :: fibonacci series in java using recursion 
Java :: indexoutofboundsexception java 
Java :: cosinus-1 java 
Java :: android create snackbar 
Java :: randomize 2d array java 
Java :: hashmap iteration 
Java :: how to declare an array in java 
Java :: copy array in java 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =