Skip to content

Instantly share code, notes, and snippets.

View HelixSpiral's full-sized avatar
🐔
🐔🐔🐔🐤🐤🐤🐤

Shawn Smith HelixSpiral

🐔
🐔🐔🐔🐤🐤🐤🐤
View GitHub Profile
@HelixSpiral
HelixSpiral / OneHundredDoors.c
Created January 10, 2012 07:06
One Hundred Doors
/* http://rosettacode.org/wiki/100_doors */
#include <stdio.h>
int main()
{
int x, y;
int doors[100] = { 0 };
/* Loop the 100 times */
@HelixSpiral
HelixSpiral / Triangle.c
Created January 6, 2012 20:06
Creates a command-line triangle
/* Creates a triangle */
#include <stdio.h>
int main()
{
/* vars */
int lines, stars, x, y;
printf("How many lines do you wish the triangle to be?: ");
@HelixSpiral
HelixSpiral / Diamond.c
Created January 6, 2012 19:40
Creates a command-line diamond
/* Creates a diamond */
/* Needed for standard IO features */
#include <stdio.h>
int main()
{
/* The number of lines we want the diamond to be */
int lines, x, y;
int stars = 1;