TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Simple Area & Perimeter of Circle Program in JAVA.
Alagunila Meganathan
Aug 10
2016
Code
889
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
CircleArea.rar
import
java.io.*;
import
java.lang.*;
class
CircleArea{
public
static
void
main(String[] args){
int
r=
0
;
try
{
BufferedReader br1 =
new
BufferedReader(
new
InputStreamReader(System.in));
System.out.println(
"Enter Radius of Circle : "
);
r = Integer.parseInt(br1.readLine());
double
area = Math.PI*r*r;
System.out.println(
"Area of Circle : "
+area);
double
perimeter =
2
*Math.PI*r ;
System.out.println(
"Perimeter of Circle : "
+perimeter);
}
catch
(Exception e){
System.out.println(
"Error : "
+e);
}
}
}
java
circle