Upload files to "OOP/Java/Lab/Week1"
This commit is contained in:
parent
24683dac5a
commit
8542582101
5 changed files with 101 additions and 0 deletions
13
OOP/Java/Lab/Week1/Rectangle.java
Normal file
13
OOP/Java/Lab/Week1/Rectangle.java
Normal file
|
@ -0,0 +1,13 @@
|
|||
class Rectangle
|
||||
{
|
||||
public static void main(String args[])
|
||||
{
|
||||
int a,b,c,l;
|
||||
l = Integer.parseInt(args[0]);
|
||||
b = Integer.parseInt(args[1]);
|
||||
c = 2*(l+b);
|
||||
a = l*b;
|
||||
System.out.println("The Circumference of the Rectangle = "+ c);
|
||||
System.out.println("The Area of the Rectangle = "+ a);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue