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
#include "stdio.h" | |
#include "stdlib.h" | |
#include "string.h" | |
enum { NOUGHTS, CROSSES, BORDER, EMPTY }; | |
enum { HUMANWIN, COMPWIN, DRAW }; | |
const int Directions[4] = { 1, 5, 4, 6 }; | |
const int ConvertTo25[9] = { |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* Structure declaration */ | |
struct personCatalog { | |
char name[50]; | |
char address[50]; | |
char cityState[50]; | |
char zipCode[7]; |
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
#include <stdio.h> | |
#define SIZE 20 | |
//http://www.robertdickau.com/lattices.html must be known for solution. | |
int main(void) { | |
int i,j; | |
long long int grid[SIZE+1][SIZE+1]; | |
long long sum = 0; | |
for(i=0;i<SIZE;i++) |
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
//https://projecteuler.net/problem=52 | |
#include <stdio.h> | |
enum boolean{false,true}; | |
typedef enum boolean bool; | |
int main(void) { | |
int isFound = false ; | |
int index = 100002; | |
int two_multiplier; | |
int three_multiplier; | |
int four_multiplier; |
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
// https://projecteuler.net/problem=8 | |
#include <stdio.h> | |
#include <string.h> | |
#define MAX_DIGIT 13 | |
#define NUM 1000 | |
int main(void) { | |
char num[NUM+1]; |
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
//Bir sayının tersini özyinemeli olarak alıyor. | |
// Fibonacci serisi ve faktöriyel örnekleride özyinemeli olarak daha rahat çözülebilir. | |
#include <stdio.h> | |
#include <math.h> | |
int main(void) | |
{ | |
int number; | |
int length=0; | |
printf("Number: "); | |
scanf("%d",&number); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int loopIndex; | |
int loopIndex2; | |
void ShowSort(int,int[]); | |
void BubbleSort(int, int[]); | |
void InsertionSort(int,int *); |
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
/* | |
Smith Sayısı nedir? | |
1 den büyük asal olmayan bir tamsayının rakamlarının toplamı, sayı asal çarpanlarına ayrılarak yazıldığında bu yazılışta bulunan tüm asal sayıların rakamlarının toplamına eşit oluyorsa bu tür sayılara Smith sayısı denir. | |
Örneğin: | |
728 = 2 * 2 * 2 * 7 * 13 | |
7 + 2 + 8 = 2 + 2 + 2 + 7 + 1 + 3 | |
*/ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define SIZE 10 | |
#define SORTED 1 | |
#define UNSORTED 0 | |
int main(void) { | |
int i,j; | |
int Arr[SIZE]={10,2,6,9,-8,3,2,4,5,8}; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define SIZE 2 | |
enum boolean{ | |
false=0, | |
true | |
}isTrue; | |
typedef enum boolean bool; | |