15.13.00
Indra Yusuf
1. ALGORITMA BILANGAN PRIMA
Metode Pertama
int m = 30; // batas boolean [] prima = new boolean [m+1];for ( int i = 0; i < = m; i++ )prima [i] = true;prima [0] = prima [1] = false;double akarN = Math.sqrt (m);for (int i = 2; i < = akarN; i++ )if ( prima [i] )for ( int j = i*i; j < = m; j++ )if ( (j%i) == 0 )prima [j] = false;for (int i = 0; i < = m; i++ )if ( prima [i] && ( i > = n ) )System.out.println (i + "\n");
Metode kedua
Dim i, min, max, j As integer Dim hsl As String = " " Dim val As Boolean = True
...
12.29.00
Indra Yusuf
Normal 0 false false false MicrosoftInternetExplorer4
st1\:*{behavior:url(#ieooui) }
!--
/* Font Definitions */
@font-face
{font-family:Batang;
panose-1:2 3 6 0 0 1 1 1 1 1;
mso-font-alt:바탕;
mso-font-charset:129;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:1 151388160 16 0 524288 0;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
@font-face
{font-family:"\@Batang";
panose-1:0 0 0 0 0 0 0 0 0 0;
mso-font-charset:129;
mso-generic-font-family:auto;
mso-font-format:other;
mso-font-pitch:fixed;
mso-font-signature:1 151388160...
14.34.00
Indra Yusuf
Normal 0 false false false MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
Algoritma Shorting Dengan Java1. Algoritma Sorting Pengertian Algoritma Sorting adalah kumpulan langkah sistematis atau secara berutan untuk memperoleh hasil yang diinginkan. Salah satu contoh dari algoritma untuk langkah...