Saturday, October 31, 2015

// // Leave a Comment

Java Program To Calculate Area And Perimeter Of A Rectangle

Liang's Introduction to Java Exercise 1.9
 
/**
 *
 * @Author: Aghatise Osazuwa
 * Website: www.cscprogrammingtutorials.com
 *
 * Exercise 1.9 - Area And Perimeter Of A Rectangle
 *
 */ 

public class Ex1_09 {
  public static void main(String[] args) {
     System.out.println("Width = 4.5 \nHeight = 7.9");
     System.out.println("Area = width x height = " + 4.5 * 7.9);
     System.out.println("Perimeter = 2 x (width + height) =" + 2 * (4.5 + 7.9));
  }
}
Solution to Liang's Introduction to Java Exercise 1.9
Program Output

Click here to see other solutions to Introduction to Java Programming.

0 comments:

Post a Comment


DISCLAIMER: Opinions expressed in comments are those of the comment writers alone and does not reflect or represent the views of the post author. We reserve the right to delete any post deemed inappropriate or offensive and/or spammy. Please do not use abusive words/hate speech.

I Appreciate your valuable Feedback. So, Please DO NOT SPAM - Spam comments will be deleted immediately.

Don't use brand name in name field and you're not allowed to use links in comments unless it's necessary. Such comments will be removed immediately.

Thanks.