daily_automated
This commit is contained in:
37
trunk/workspace/Test_Java/src/JavaTest.java
Normal file
37
trunk/workspace/Test_Java/src/JavaTest.java
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* First test - 12.01.2010
|
||||
*/
|
||||
|
||||
//import java.lang.Math.*;
|
||||
|
||||
public class JavaTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
int a,col=0;
|
||||
|
||||
System.out.println("\nFirst test.");
|
||||
for(a=0;a<0x100;a++) {
|
||||
if(a%16==0){
|
||||
System.out.println("");
|
||||
}
|
||||
System.out.format(" %02x",a);
|
||||
}
|
||||
System.out.println("\n\n-This was a HEX Table.\n");
|
||||
|
||||
double b,c;
|
||||
for(c=0;c<2*Math.PI;c+=0.1) {
|
||||
b=Math.sin(c);
|
||||
a=(int)((b+1)*128);
|
||||
System.out.format(" %02x",a);
|
||||
col++;
|
||||
if(col%16==0){
|
||||
System.out.println("");
|
||||
}
|
||||
}
|
||||
System.out.println("\n\n-This was a SIN(x) table.\n");
|
||||
|
||||
//End of the program
|
||||
System.out.println("\nEnd.\n");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user