This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://lawanasap.org/js/asap.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. algoritma genetik kuantum | |
2. algoritma a* | |
3. algoritma uniform | |
4. algoritma bidirectional search | |
5. algortima |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "stdio.h" | |
#define n 10 | |
void main() | |
{ | |
int A[n] = {15,10,7,22,17,5,12,8,15,10}; | |
int X, I, K; | |
printf("Sebelum di-sort\n"); | |
for (I=0; I <= n-1; I++) | |
printf("%3i", A[I]); | |
printf("\n"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define n 20 | |
int S[n], top1, top2, x; | |
void awal(); | |
void push1(); | |
void pop1(); | |
void push2(); | |
void pop2(); | |
void tampil(); | |
void main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int S[10], top; | |
void awal(); | |
void push(); | |
void pop(); | |
void tampil(); | |
void main() | |
{ | |
int pil, kondisi=1; | |
awal(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int S[10], top1, top2; | |
void awal(); | |
void push1(); | |
void push2(); | |
void pop1(); | |
void pop2(); | |
void tampil(); | |
void main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define n 10 | |
void awal(); | |
void masuk(); | |
void keluar(); | |
void tampil(); | |
int Q[n], counter, depan, belakang, bil; | |
void main() | |
{ | |
int kondisi = 1, pil; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Susun program (penggalan program) untuk menginputkan dua buah bilangan | |
long integer yang berbeda, lebih besar dari nol, misal disimpan dalam | |
variabel A dan B. Kemudian cari dan cetak pembagi persekutuan terbesar | |
kedua buah bilangan tersebut. | |
#include <iostream> | |
#include <conio.h> | |
using namespace std; | |
long cekkosong(long nil) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sebuah kebun besar ditanami pohon bibit sebanyak n baris. Setiap baris | |
terdiri dari n pohon, sehingga kebun besar ini dapat kita sebut ukurannya = n | |
x n. Pohon-pohon tersebut kemudian dicabut dan ditanam ulang menjadi 13 | |
buah kebun dengan ukuran lebih kecil yaitu setiap kebun kecil terdiri dari m | |
baris dan setiap baris terdiri dari m pohon, sehingga kebun kecil ini kita sebut | |
berukuran m x m. | |
Setelah terbentuk 13 kebun kecil ukuran m x m, ternyata pada kebun besar | |
masih tersisa 1 pohon. | |
Susun program untuk mencetak berapa jumlah pohon semula yang ada di | |
kebun besar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Titik A dan titik B dihubungkan hanya oleh sebuah jalan yang panjangnya = | |
1100 m. Ali berangkat dari titik A menuju titik B tepat jam 08:00:00 pagi dengan | |
kecepatan tetap 10 m/detik, tidak pernah berubah. | |
Sepuluh detik kemudian, yaitu pukul (08:00:10) Badu berangkat dari titik B | |
menuju titik A dengan kecepatan awal 5m/detik. Tetapi 10 detik kemudian, | |
kecepatannya naik sebesar 2m/detik menjadi 7m/detik. Demikian seterusnya, | |
setiap 10 detik kecepatan Badu naik sebesar 2m/detik. | |
Susun algoritma untuk mencetak pukul berapa (Jam : Menit : Detik) Ali dan | |
Badu bertemu dijalan. | |
Bila Ali dan Badu berpapasan dititik C, cetak jarak titik A dengan titik C. |