Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners pls answer these question
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Iswaran
pls answer these question
1 Answer(s)      3 years and 2 months ago
Posted in : Java Beginners


Write a program that prompts the user to input the length and width of a rectangle. Then calculate and prints the rectangle‚??s area and perimeter.


Advertisement
View Answers

August 23, 2011 at 11:58 AM


import java.io.*;
class rectangle{
    public static void main(String[] args)throws Exception{
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        System.out.print("Enter Length: ");
        int l=Integer.parseInt(br.readLine());
        System.out.print("Enter Width: ");
        int b=Integer.parseInt(br.readLine());
        int area=l*b;
        int perimeter=(2*l)+(2*b);
        System.out.println("Area of Rectangle: "+area);
        System.out.println("Perimeter of Rectangle: "+perimeter);
    }
}


Related Tutorials/Questions & Answers:
pls answer these question
pls answer these question  Write a program that prompts the user to input the length and width of a rectangle. Then calculate and prints the rectangle‚??s area and perimeter.   import java.io.*; class rectangle
pls answer the Trangle pattern
pls answer the Trangle pattern    a b c d e b c d e c d e d e e Please answer and give the code for above triangle
Advertisements
pls answer - Security
pls answer  what are the difference of open source dbms and proprietary dbms
pls help me with this question
pls help me with this question  how to write a program in C++ using encapsulation,polymorphism,inheritance and abstraction?(all these concepts should come in a single program
share your answer to this question
share your answer to this question  i need to know what is the TELERIK CONTROL? what is the map suite? what is dunda chart? Also i have to know what are the websites available which give infor regarding this. Let me know how
pls give me answer ae soon as possible - Ajax
pls give me answer ae soon as possible  i m writing code of ajax technology ...but it is not working pls check it n give me response quickly... give me quick response!!! thanks & regards shashank gupta
java interview question and answer - Java Interview Questions
java interview question and answer   sir, i want one mark java interview question and answers
i cNT GET ANSWER FOR THIS QUESTION
i cNT GET ANSWER FOR THIS QUESTION  The roots of the quadratic equation ax2+bx+c=0, a√Į‚??¬Ļ0 are given by the following formula: x=(-b√?¬Ī√Ęň?Ň°(b^2-4ac))/2a In this formula. The term b2-4ac is called
Please , can any one answer this Question?
Please , can any one answer this Question?  How to cummunicate one web application to another web application in different places
Clarify my last question's answer - Java Beginners
Clarify my last question's answer  Dear expert, I've tried out... did not specify my question too clearly. Here's my 2 database... question. Do you want to search through id or through the qualification selected
Java experts.Please answer this question - Java Beginners
Java experts.Please answer this question  class A { void get() { System.out.println("A's method"); } } class C extends A{} class D extends A { void set() { System.out.println("D's method"); } } class ins { public
i have a problem to do this question...pls help me..
i have a problem to do this question...pls help me..  Write a program that prompts the user to input an integer and the output the number with the digits reversed. For example if the input is 12345, the output should be 54321
i need to answer this Question but i can't do it probably
i need to answer this Question but i can't do it probably   use the web to locate the lyrics to the traditional song"The Twelve Days of Christmas" the song contains a list of gifts received for the holiday.the list is cumulative
hi... pls give me the example of java coding fo following question
hi... pls give me the example of java coding fo following question  example java coding that reads in the radius and length of cylinder and computes volume. formula: Area = radius * radius * PI Volume = area * length
hi... pls give me the example of java coding fo following question
hi... pls give me the example of java coding fo following question  Write a java program that reads the following information and prints a payroll statement: Employee‚??s name (e.g: Sam) Number of hours worked in a week (e.g: 10
hi... pls give me the example of java coding for following question
hi... pls give me the example of java coding for following question   Write a program that computes loan payments. The loan can be a car loan, a student loan, or a home mortgage loan. The program lets the user enter the interest
hi,i'am new to Jsp.Can some one please let me know an answer for this question?
hi,i'am new to Jsp.Can some one please let me know an answer for this question?  how do we upload an xml file and validate them against WIPO DTD
Question Answer
website. If you found the question you can read the answer if it solves your...? Browse Latest Questions Question-Answer Guidelines... Here, you can post your desired question. For posting any question / query
send answer
send answer  For online exam project,i want single question on single page and on that page there are three buttons previous,submit,next.If i click on next button it show next question from database
answer it soon
answer it soon  write a proggram to accept a number and check whether the sum of prime factors of a number is a prime number
java.please answer this...
java.please answer this...   Q1).How we can write a complete JAVA program that computes the following summation formulas..? ‚??_(i=1)^n‚??„??i^2=„?? (n^(2 ) „??(n+1)„??^2)/4
Question-Answer Guidelines
Question-Answer Guidelines How to ask questions... and rating the articles/ tutorials. Same like this, question-answer section... Question-Answer Guidelines Disclaimer RoseIndia does
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
pls help me it urgent
pls help me it urgent  hey, pls help me i want to know that can we call java/.bat file from plsql/proceudre /trigger
Pls anyboby tell me...
Pls anyboby tell me...  which book easy to learn spring
pls send code
pls send code   pls send code for set database value into text box based on selected value in struts and jsp   use any database and get its code for getting values from google
Pls send code
Pls send code   I am Mohini Charankar suppose Name="Mohini" Edit Button Click on that I change my Name with "Mohini/" Save it and page refresh After... an error pls send code
Pls help me with strings
Pls help me with strings  To reverse a every other word in a string. Example :- If the input is "This is a line of message" the output should be "sihT is a line fo message
Pls help me with strings
Pls help me with strings  To reverse a every other word in a string. Example :- If the input is "This is a line of message" the output should be "sihT is a line fo message
Advertisements
 

 

 

DMCA.com