Let's Play:
- » Call Of Duty 4
- » GTA IV
- » Metal Gear Solid 4
- » Team Fortress 2
- » Counter Strike Source
A series of Tubes!:
- 1 digg / reddit
- 2 the iconfactory
- 3 daring fireball
- 4 lifehacker
- 5 abduzeedo
Currently Reading:
- » Kafka on the Shore
- » The Shock Doctrine
- » Terror And Power
Flickr
Programming by the people for the people
Some Basic Pascal and C Examples first: (You should not try to learn how to programm with me, you need a good book or teacher. Knowing Syntax does not make you a programmer.)
- while/if/for
- Recursion
- RTFM
Sorting Algorithms
First You should go to wikipedia and try to learn what every single sort algorithm does, the "classics" are Bubblesort, Quicksort, Mergesort, Heapsort. Take a look to my code and maybe it may help! of course, you should try to doit by yourself but a little help is not bad. Bubblesort1 int
Pascal
1 2 3 4 5 6 7 9 10 11 12 13 14 15 16 17 21 22 24 25 26 27 28 29 31
ANSI C
n!
Don't worry, I'll update this page with more useful algorithms.
1 /* factorial!*/ 2 float 3 { 4 int producto=1; 5 6 if(n==0) 7 return 1; 8 else 9 { 10 producto=n*factorial(n-1); 11 return producto; 12 } 13 } 14 15 /* programa principal*/ 16 int 17 { 18 /*variables*/ 19 int iteraciones,i; 20 float numero_e=0; 21 22printf("e \n numero de iteraciones"); 23 scanf("%d", &iteraciones); 24 for 25numero_e=numero_e+(1/(factorial(i))); 26 printf("el numero e = %4.8f \n", numero_e); 27 return 0; 28 }

