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> | |
#include <stdlib.h> | |
#include <string.h> | |
static int intArray[255]; | |
static char charArray[255] = "5 2 -3 4 0 9"; | |
static int numInt = 0; | |
void charToIntArray() { | |
char *p; |
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 <iostream> | |
#include <conio.h> | |
using namespace std; | |
class Node { | |
public: | |
double data; | |
Node* next; | |
}; |
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> | |
#include <conio.h> | |
void isihan_selitan(int, int []); | |
int main() | |
{ | |
int i, saiz=10, susun[10] = {24,64,10,5,6,31,15,20,56,34}; | |
printf("\n Data belum terisih :\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 <iostream> | |
#include <conio.h> | |
using namespace std; | |
void BubbleSort(int data[], int listSize) | |
{ | |
int pass, tempValue; | |
for(pass = 1; pass < listSize; pass++) | |
{ | |
for(int x=0; x < listSize - pass; x++) |
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> | |
#include <conio.h> | |
void BubbleSort(int [], int); | |
int main() | |
{ | |
int i,saiz=10, susun[10] = {24,64,10,5,6,31,15,20,56,34}; | |
printf("\n Data belum terisih :\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
// Program 2.14 | |
#include <iostream> | |
using namespace std; | |
int bil = 0; | |
class UJI | |
{ | |
private: | |
int nilai; | |
public: |
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
n = int(input()) | |
raw = input().split(" ") | |
decisions = [] | |
# decide first move | |
for i in range(1): | |
# gym no, contest no | |
if raw[i] == "0": |
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
// Inspiration from http://www.geeksforgeeks.org/greedy-algorithms-set-6-dijkstras-shortest-path-algorithm/ | |
// Most of this code by me, adjacency matrix from above | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
#define numOfVertices 9 |
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
<?php | |
/* | |
* function gcd() | |
* | |
* returns greatest common divisor | |
* between two numbers | |
* tested against gmp_gcd() | |
* credit: http://php.net/manual/en/function.gmp-gcd.php#86931 | |
*/ | |
function gcd($a, $b) |
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
<?php | |
$number = 1; | |
while(true) | |
{ | |
$i = 0; | |
for($i=1; $i < 11; $i++) | |
{ | |
if($number % $i != 0) | |
{ | |
break; |
NewerOlder