In this, we are going to write a program to find Area and Perimeter using float in Java.
class Area
{
public static void main(String[] args)
{
int s = 25, a, p;
a = s * s;
p = 4 * s;
System.out.println("Area = " + a);
System.out.println("Perimeter = " + p);
}
}
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP