2、和文字组成的图形。10.求两个数的最大值。1.public class Sum{ public static void main(String args[]) { double sum=0.0; for (int i=1; i<=100;i++) sum+=1.0/(double)i; System.out.println("sum="+sum); }}2.import java.io.*; public class Reverse { public static void main(String arg
3、s[]) { int i,n=10; int a[]=newint[10]; for (i=0;i
4、tch(IOException e){}; for (i=n-1;i>=0;i――) System.out.print(a[i]+" "); System.out.println(34); } }3.import java.awt.*; public class abc { public static void main(Stringargs[]) { newFrameOut();} } class FrameOut extends Frame // Fram
5、e为系统定义的窗框类 { Buttonbtn; FrameOut() { super("按钮"); btn=new Button("按下我"); setLayout(new FlowLayout()); add(btn); setSize(300,200); show(); } }4.importjava.io.*;public class Class1{ public static void ma
6、in(String args[]){ int i,Max,Min; int a[]={12,67,8,98,23,56,124,55,99,100}; Max=Min=a[0]; for (i=1;iMax) Max=a[i]; } System.out.println(Max+" "+Min); System.out.println(); }}5.public class ABC{ pu
7、blic static void main(String args[]){ int i,j; int a[]={12,67,8,98,23,56,124,55,99,100}; for (i=0;i