Pages

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Rabu, 23 Mei 2012

Function knapsack greedy di DEVV C++

#include <cstdlib> #include <iostream> using namespace std; void knapsack(int n, float weight[], float profit[], float capacity) {  float x[20], tp= 0;  int i, j;  float u=capacity;  for (i=0;i<n;i++)      x[i]=0.0;  for (i=0;i<n;i++)  {  if(weight[i]>u)       break;  else      {      x[i]=1.0;      tp= tp+profit[i];  ...

PROGRAM LAGORITMA DIJKSTRA

#include <cstdlib> #include <iostream> #define max 20 #define infinity 9999 using namespace std; class dijkstra{       private:               int n,graph[max][max],colour[max],start,distance[max],predecessor[max];               enum {green,yellow,red};       public:              void read_graph();  ...

Sabtu, 12 Mei 2012

GARFIKA PRAKTIKUM 6

#include <windows.h>  #include <stdio.h>  #include <stdlib.h>  #include <string.h> #include <stdarg.h>  #include <glut.h> #include <glu.h> #include <iostream> float _angle = 45.0f; //Draws the 3D scene void mydisplay()  {      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);     glMatrixMode(GL_MODELVIEW);//Switch to setting     glLoadIdentity();//Reset the camera     //glTranslatef(0.0f, 0.6f,...

Rabu, 09 Mei 2012

pseudo-code Algoritma Kruskal

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 ...

Program Prims Baru

#include<iostream.h> #include<conio.h> class prims { private: int n; //no of nodes int graph_edge[250][4]; //edges in the graph int g; //no of edges in the graph int tree_edge[250][4]; //edges in the tree int t; //no of edges in the tree int s; //source node //Partition the graph in to two sets int T1[50],t1; // Set 1 int T2[50],t2; // Set 2 public: void input(); int findset(int); void algorithm(); void output(); }; void prims::input() { cout<<"*************************************************\n" <<"This...

PROGRAM KRUSKAL

#include <cstdio> #include <vector> #include <algorithm> using namespace std; #define edge pair< int, int > #define MAX 1000 vector< pair< int, edge > > GRAPH, MST; int verteks, edg, parent[MAX], total ; int findset(int , int ); void cetak(); void kruskal(); void reset(); int main() {     int i, u, v, w;     printf("Masukkan jumlah verteks : ");     scanf("%d", &verteks);  ...

Minggu, 06 Mei 2012

Kapan Terjadinya Konkurensi

    .  Jelaskan kapan terjadi Konkurensi? Jawab  :Konkurensi adalah proses-proses (lebih dari satu proses) yang terjadi pada saat bersamaan. Konkurensi merupakan landasan umum perancangan sistem operasi. Proses-proses disebut konkuren jika proses-proses berada pada saat yang sama.Konkurensi dapat terjadi pada, antara lain:a)     Banyak aplikasi (multiple application).Multiprogramming memungkinkan banyak proses sekaligus dijalankan. Proses-proses dapat berasal dari aplikasi-aplikasi berbeda. Pada sistem...

Sabtu, 05 Mei 2012

PRAKTIKUM GRAFIKA 5 (LINGKARAN)

/* Praktikum 05 * Membuat objek lingkaran sederhana */ #include <iostream> #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <glut.h> #include<math.h> using namespace std; typedef unsigned char uchar; // number of line segments static int num_lines = 20; // callback prototypes void disp(void); void keyb(uchar k, int x, int y); void reshape(int x, int y); // main int main(int argc, char **argv){ glutInit(&argc,argv); glutInitDisplayMode(GLUT_RGBA...

Senin, 30 April 2012

Cara Menambahkan Icon Burung Twitter Terbang di BLOG

Untuk MemperLucu dan Agar pengunjung bisa FoLLow Twitter Kalian Melalui BLOG anda,ada widget Lucu nich 1.Pertama Copy Code HTML di bawah ini: <script type="text/javascript" src="http://melayang.googlecode.com/files/Twitterkumpulancara.js"></script><br /> <script type="text/javascript"> var birdSprite="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRGbzcl_32NPN-YX1ED_S6qTkjZA-5A5kv1q-H_Yp-Ohmf1dAM7skXInG0pdPIQbX5AxacSy-MN7w6yQ5uYFUCAodp0pH_YDhuKPd65EvNrY5OUKWxXocFvP1EdYQeMJ9wzE913ptA8NA/s800/TwitterBlue.png";...

Minggu, 29 April 2012

Pengalamatan IP

Normal 0 false false false EN-US X-NONE AR-SA MicrosoftInternetExplorer4 ...