WAP to accept a 20 different radius for 20 circles
find out the tiniest circle, depending on it's circumference
Answers
Answer:
import java.util.*
{
public class circle
{
Scanner sc=new Scanner
{
public static void main(String[]args)
{
System.out.println("enter radius1");
double r1=nextInt();
System.out.println("radius="+r);
double c1=(2*22/7*r);
{
System.out.println("enter radius2");
double r2=nextInt();
System.out.println("radius="+r2);
double c2=(2*22/7*r);
{
System.out.println("enter radius3");
double r3=nextInt();
System.out.println("radius="+r3);
double c3=(2*22/7*r);
{
System.out.println("enter radius4");
double r4=nextInt();
System.out.println("radius="+r4);
double c4=(2*22/7*r);
{
System.out.println("enter radius5");
double r5=nextInt();
System.out.println("radius="+r5);
double c5=(2*22/7*r);
{
System.out.println("enter radius6");
double r6=nextInt();
System.out.println("radius="+r6);
double c6=(2*22/7*r);
{
System.out.println("enter radius7");
double r7=nextInt();
System.out.println("radius="+r7);
double c7=(2*22/7*r);
{
System.out.println("enter radius8");
double r8=nextInt();
System.out.println("radius="+r8);
double c8=(2*22/7*r);
{
System.out.println("enter radius9");
double r9=nextInt();
System.out.println("radius="+r9);
double c9=(2*22/7*r);
{
System.out.println("enter radius10");
double r10=nextInt();
System.out.println("radius="+r10);
double c10=(2*22/7*r);
{
double m=Math.min(c1,c2);
double n=Math.min(c3,m);
double o=Math.min(c4,n);
double p=Math.min(c5,o);
double q=Math.min(c6,p);
double r=Math.min(c7,q);
double s=Math.min(c8,r);
double t=Math.min(c9,s);
double u=Math.min(c10,t);
{
System.out.println("the smallest circle formed"+u);
}
}
}
}
}
}
}
}
}
}
}
}
}