Skip to content

Instantly share code, notes, and snippets.

View Phitherek's full-sized avatar
💭
-> GitLab

Phitherek_ Phitherek

💭
-> GitLab
View GitHub Profile
@Phitherek
Phitherek / strings.c
Created March 22, 2012 11:50
Program do sprawdzenia, jak zachowują się stringi (z wykładu Hawka).
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char a[3];
char b[3];
char c[3];
char tek[4];
*a = "aaa";
@Phitherek
Phitherek / decider.cpp
Created March 12, 2012 20:43
Phitherek_' s Decider v. 0.1
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
srand(time(NULL));
cout << "Phitherek_' s Decider v. 0.1 (c) 2012 by Phitherek_" << endl;
char pt;
do {
cout << "Poziom trudności testu (l - Łatwy, s - Średni, t - Trudny, q - zakończ): ";
@Phitherek
Phitherek / mergesort.c
Created March 9, 2012 10:52
MergeSort w C wg algorytmu Hawka
#include <stdlib.h>
#include <stdio.h>
void merge(int* A, int p, int q, int r) {
printf("merge(A, %d, %d, %d)\n", p, q, r);
int a,b,i,j,k;
int* L;
int* P;
a = q-p+1;
printf("a=%d\n", a);