Tuesday, July 29, 2008
~GaMe~Grid (Racing)
best racing game aver....rate untuk game ni ak bg 8/10..category best r game ni..mmg best..best untuk games2 racing..effect game ni mmg antara plg real..kete langgar rosak,performance kete makin kurang..graphic mmg 10/10..cun gila..main dia punyea driff mmg layan abis.....dia punyea effect asap2 dia mmg cun...gila2...cun2...game yg di programkan oleh oleh orang MALAYSIA...bangga ak orang MALAYSIA pn bleh wt game HD graphic cm ni....xsangka...bukan us n jepun je..MALAYSIA pn dh ada beb..ada gak r kekurangan game ni,1) xlh customize kete..kene terima kete yg computer dh wt 2..2)semua race legal..xde underground...agak xbest skit la kt c2..apa2 pn game ni mmg layan..kalau ada set stereng lg layan r...tp yg ringan n murah xlayan r...mane best nk wt driff ringan2...ak rasa nape dia xwt customize kete,sbb xde customize pn dh cecah 10Gb game ni..ha..jangan terkejut..2DVD beb..bukan game biasa2...kalu dia letak customize n underground race nk je cecah 4DVD lebih kurang 16Gb game ni..gila ko...mmg berat r..setakat RAM 1G xlayan la..at least 2G...thanks 2 programer yg buat game ni...lg best dari "test drive ultimate"...Ada berni?Try la kawan...k bye..
MatrixMultiplication.java
* 6 different ways to multiply two N-by-N matrices.
* Illustrates importance of row-major vs. column-major ordering.
http://www.cs.princeton.edu/introcs/95linear/MatrixMultiplication.java.html
Monday, July 28, 2008
ScannerApp.java
// File : ScannerApp.java
// Purpose: Write to and read from the console.
import java.util.*; //Note 1
public class ScannerApp {
public static void main(String[] args) {
//... Initialization
String name; // Declare a variable to hold the name.
Scanner in = new Scanner(System.in);
//... Prompt and read input.
System.out.println("What's your name?");
name = in.nextLine(); // Read one line from the console.
in.close(); //Note 2
//... Display output
System.out.println("Take me to your leader, " + name);
}
}
// Purpose: Write to and read from the console.
import java.util.*; //Note 1
public class ScannerApp {
public static void main(String[] args) {
//... Initialization
String name; // Declare a variable to hold the name.
Scanner in = new Scanner(System.in);
//... Prompt and read input.
System.out.println("What's your name?");
name = in.nextLine(); // Read one line from the console.
in.close(); //Note 2
//... Display output
System.out.println("Take me to your leader, " + name);
}
}
Friday, July 25, 2008
Euclid's Algorithm
For two positive integers
else return gcd(b, a mod b)
Program
import java.io.*;
public class Euclid{
public static int gcd(int a,int b){
if (b == 0)
return a;
else
return gcd(b, a%b);
}
public static void main(String[] args){
try{
BufferedReader object=new BufferedReader
(new InputStreamReader(System.in));
System.out.print("input a:");
String x=object.readLine();
System.out.print("input b:");
String y=object.readLine();
int a = Integer.parseInt(x);
int b = Integer.parseInt(y);
System.out.println("gcd(" + a + ", " + b + ") = " + gcd(a,b));
}
catch(Exception e){}
}
}
For three positive integers
Algorithm (using iteration)
function gcd(a, b)
while b ≠ 0
t := b
b := a mod b
a := t
return a
Program
import java.io.*;
public class Euclid2{
public static int gcd(int p, int q) {
while (q != 0) {
int temp = q;
q = p % q;
p = temp;
}
return p;
}
public static void main(String args[]){
try{
BufferedReader object=new BufferedReader
(new InputStreamReader(System.in));
System.out.print("input a:");
String x=object.readLine();
System.out.print("input b:");
String y=object.readLine();
System.out.print("input c:");
String z=object.readLine();
int a = Integer.parseInt(x);
int b = Integer.parseInt(y);
int c = Integer.parseInt(z);
int r1 = gcd(a, b);
int r2 = gcd(c,r1);
System.out.println("gcd = " + r2);
}
catch(Exception e){}
}
}
Algorithm (using recursion)
function gcd(a, b)
else return gcd(b, a mod b)
Program
import java.io.*;
public class Euclid{
public static int gcd(int a,int b){
if (b == 0)
return a;
else
return gcd(b, a%b);
}
public static void main(String[] args){
try{
BufferedReader object=new BufferedReader
(new InputStreamReader(System.in));
System.out.print("input a:");
String x=object.readLine();
System.out.print("input b:");
String y=object.readLine();
int a = Integer.parseInt(x);
int b = Integer.parseInt(y);
System.out.println("gcd(" + a + ", " + b + ") = " + gcd(a,b));
}
catch(Exception e){}
}
}
For three positive integers
Algorithm (using iteration)
function gcd(a, b)
while b ≠ 0
t := b
b := a mod b
a := t
return a
Program
import java.io.*;
public class Euclid2{
public static int gcd(int p, int q) {
while (q != 0) {
int temp = q;
q = p % q;
p = temp;
}
return p;
}
public static void main(String args[]){
try{
BufferedReader object=new BufferedReader
(new InputStreamReader(System.in));
System.out.print("input a:");
String x=object.readLine();
System.out.print("input b:");
String y=object.readLine();
System.out.print("input c:");
String z=object.readLine();
int a = Integer.parseInt(x);
int b = Integer.parseInt(y);
int c = Integer.parseInt(z);
int r1 = gcd(a, b);
int r2 = gcd(c,r1);
System.out.println("gcd = " + r2);
}
catch(Exception e){}
}
}
Saturday, July 12, 2008
Tarikh-tarikh penting
Hari Matematik (2 Ogos 2008)
Pertandingan Melukis Poster sempena Hari Matematik 2008.
PROMED@CS08 (9th - 10th August 2008)
International Hacking Competition 2008 (15th - 17 August 2008)
Pertandingan Melukis Poster sempena Hari Matematik 2008.
PROMED@CS08 (9th - 10th August 2008)
For more info click here
http://www.tmsk.uitm.edu.my/~promedcs08
International Hacking Competition 2008 (15th - 17 August 2008)
For more info click here
http://www.tmsk.uitm.edu.my/~i-hack
Subscribe to:
Posts (Atom)