This file contains hidden or 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
/* http://rosettacode.org/wiki/100_doors */ | |
#include <stdio.h> | |
int main() | |
{ | |
int x, y; | |
int doors[100] = { 0 }; | |
/* Loop the 100 times */ |
This file contains hidden or 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
/* 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?: "); |
This file contains hidden or 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
/* 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; |
NewerOlder