Code:
import java.io.FileWriter;
import java.util.Scanner;
public class Rectangle {
public static void main( String[] args )
{
float Length, Width, Area;
float []lengtharray = new
float[10];
float []widtharray = new
float[10];
float []areaarray = new
float[10];
StringBuilder sb =new
StringBuilder();
Scanner reader = new Scanner(System.in);
for(int i=0;i<10;i++)
{
System.out.print("Enter Length of Rectangle "+(i+1)+":
");
Length = reader.nextFloat();
lengtharray[i]=Length;
System.out.print("Enter Width of Rectangle "+(i+1)+":
");
Width = reader.nextFloat();
widtharray[i]=Width;
Area = Length * Width;
areaarray[i]=Area;
}
System.out.println("\nRectangle\tLength\tWidth\tArea");
sb.append("Rectangle\tLength\tWidth\tArea\n");
float minArea=areaarray[0];
float maxArea=areaarray[0];
int minIndex=0,maxIndex=0;
for(int i=0;i<10;i++) {
if(minArea >
areaarray[i]) {
minArea = areaarray[i];
minIndex=i;
}
if(maxArea <
areaarray[i]) {
maxArea = areaarray[i];
maxIndex=i;
}
System.out.println("
"+(i+1)+"\t\t"+lengtharray[i]+"\t"+widtharray[i]+"\t"+areaarray[i]);
//sb+=
sb.append("
"+(i+1)+"\t\t"+lengtharray[i]+"\t"+widtharray[i]+"\t"+areaarray[i]+"\n");
}
System.out.println("Largest
Rectangle: "+(maxIndex+1)+". Area: "+maxArea);
System.out.println("Smallest
Rectangle: "+(minIndex+1)+". Area: "+minArea);
sb.append("Largest Rectangle:
"+(maxIndex+1)+". Area: "+maxArea+"\n");
sb.append("Smallest Rectangle:
"+(minIndex+1)+". Area: "+minArea+"\n");
try{
FileWriter fw=new FileWriter("D:\\testout.txt");
fw.write(sb.toString());
fw.close();
}catch(Exception e){System.out.println(e);}
}
}
Output:
Op o rectate input v ;da-lion s: 3 es must be between 0-5o inches ont e어 to be display'.x on the...
SS zds, s 0:3 evaluate the surface integral where is the cone z = V x² + y2 between the xy-plone and le colid s cut z = 2.
The flow rate between the plates is a parabola u(x,y)=U0(1-y^2/b^2) v(x,y)=0 and U0=5cm/s b=1cm viscosity u=1.0x10^-3 Ns/m^2 Find (1) y=b/2 acceleration ax=? (2) y=b/2 shear stress 2b
3. (2 Points) Let Q be the quadrilateral in the ry-plane with vertices (1, 0), (4,0), (0, 1), (0,4). Consider 1 dA I+y Deda (a) Evaluate the integral using the normal ry-coordinates. (b) Consider the change of coordinates r = u-uv and y= uv. What is the image of Q under this change of coordinates?bi (c) Calculate the integral using the change of coordinates from the previous part. Change of Variables When working integrals, it is wise to choose a...
#6 table 2 8 LABORATORY REPORT 1C. TIME/DIV-S IC VOLTS/DIV-SV A VOLTS/DIV V ov o v 0 s 2A. TIME/DIN-S2B. TIME/DIV 2C TIME/DIV-mS 2C. VOLTS/DIV o V 0 s 60033 0 s 3A. TIME/DIV-m 3A, VOLTS/DIV=-, 3B. TIME/DIV-1m 3B. VOLTS/DIV o v 0 s 0 s 388 Physics Laboratory Mamual Loyd A. TIME/DIV- ms 4A. VOLTS/DIV-LV o v ov 0 s 0 s 0 s Data Table 1 X Data Table 2 Voltmeter (V Voltmeter V 1.00 2.00 3.00 4.00...
Suppose a plane passes through the points O(0,0,0). B(1,2,2) and C(-1,-1,2) and u -OB and v-OC. (See figure below.) The vector equation of the plane is:x-sutv Choose... s=0, t=0 s-1, t-1 (5,8,2) s--3, t--1.5 (2,5,8) s 3, t-1 s-3, t--2 What values of s and t correspond to point O? What values of s and t correspond to point D? What values of s and t correspond to point B? what values of s and t correspond to point C?...
Version 1 0.) Red light propagates through window glass at a speed of 2.0 x 10 m/s. This means that bli light must propagate through vacuum at a speed of: A) 1.5 x 10 m/s B) 2.0 x 10 m/s C) 2.5 x 10 m/s D) 3.0 x 10 m/s E) No way to know with the information given, but it must be <3.0 x 10 m/s A screen red, yellow, blue glass 7.) Red, yellow, and blue light along...
please use python and provide run result, thank you! click on pic to make it bigger For this assignment you will have to investigate the use of the Python random library's random generator function, random.randrange(stop), randrange produces a random integer in the range of 0 to stop-1. You will need to import random at the top of your program. You can find this in the text or using the online resources given in the lectures A Slot Machine Simulation Understand...