Huawei Pen Test
In the update ....
1. Output Flow:
try {
FileInputStream fis = new FileInputStream ("d://do not delete D disk file. txt");
byte[] bt = new byte[1024];
int res = 0;
while (res = Fis.read (BT))!=-1) {
res--;
System.out.println (New String (bt,0,res));
}
Fis.close ();
catch (IOException e) {
E.printstacktrace ();
}
2. Circular output 99 multiplication table:
for (int j = 1; J <= 9; j +) {
for (int c = 0; c < J; C +) {
System.out.print (c+ "*" +j+ "=" +c*j+ "T");
}
System.out.println ();
}
3. Double Cycle Sort:
int[] i = new int[]{34,23,67,12};
int a = 0;
System.out.println ("Sort result:");
for (int j = 0; J < I.length; J + +) {
for (int s = 0; s < J; s++) {
if (I[j]<i[s]) {
A=i[s];
I[S]=I[J];
I[j]=a;
}
}
};
4. Two-D array:
string[][] TRG = new string[10][];
for (int i = 9; I >=0; i--) {
Trg[i]=new String[10-i];
for (int j = 0; j<trg[i].length; j + +) {
Trg[i][j]= "(" +i+ "," +j+ ")";
}
}
for (int i = 9; i > 0; i--) {
for (int j = 0; J < Trg[i].length; J + +) {
System.out.println (Trg[i][j]);
}
}