This file contains 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> | |
int main() { | |
int weider[43][3], k, i, w, counter; | |
weider[1][1]=1; | |
weider[2][1]=2; | |
weider[3][1]=2; | |
for (i=4; i<=42; i++) { | |
weider[i][1]=3; | |
} |
This file contains 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> | |
//koleżanka mi napisała że w tym zadaniu chodziło o użycie long inta zamiast inta, | |
//ale to liczy te potęgi dobrze tylko do 31. co jest źle? coś ze zmiennymi? | |
int main() { | |
int i; | |
long int pot[64]; | |
pot[0]=1; | |
printf("Tablica od 0. do 63. potegi dwojki\n"); | |
printf("==================================\n"); | |
printf("%2i %li\n", 0, pot[0]); |
This file contains 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> | |
int main() { | |
printf("short int = %i bitów\n", sizeof(short int) * 8); | |
printf("int = %i bitów\n", sizeof(int) * 8); | |
printf("long int = %i bitów\n", sizeof(long int) * 8); | |
printf("long long = %i bitów\n", sizeof(long long) * 8); | |
return 0; | |
} |
This file contains 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> | |
int main() { | |
const char znaki[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; | |
int pokonw[64]; | |
long int dokonw; | |
int podstawa, i=0, nast; | |
printf("Liczba dziesiatkowa do konwersji: "); | |
scanf("%ld", &dokonw); |
This file contains 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> | |
int main() { | |
float liczby[10]; | |
int i, suma=0; | |
srand(time(NULL)); | |
printf("Generuje tablice 10-ciu floatow...\n"); | |
for (i=0; i<=9; i++) { | |
liczby[i]=rand()%100+(float)rand()/(float)RAND_MAX; |
This file contains 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> | |
int main() { | |
int number[10]={1,0,0,0,0,0,0,0,0,0}; | |
int i, j; | |
for (j=0; j<10; j++) | |
for (i=0; i<j; i++) | |
number[j]+=number[i]; | |
for (j=0; j<10; j++) |
This file contains 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
void roll(int dices[]) { | |
// losuje 5 początkowych kości | |
} | |
void roll_again(int dices[], bool hold[]) { | |
// losuje ponownie kości które mają hold = false | |
} | |
int main() { | |
int dices[5]; |
This file contains 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> | |
int rzuty(/*int kostki[5]*/) { | |
int i, j, czy, kostki[5]; | |
srand(time(NULL)); | |
printf("Wyrzuciles nastepujace liczby oczek:\n"); | |
for (i=0; i<5; i++) { | |
kostki[i]=rand()%6+1; | |
printf("%i ", kostki[i]); | |
} |
This file contains 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 <cgi.h> | |
#include <stdlib.h> | |
int main() { | |
s_cgi *cgi; | |
char *check[5]; | |
int i, hold[5]; | |
cgi = cgiInit(); |
This file contains 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 <cgi.h> | |
#include <stdlib.h> | |
/** | |
* Wypisuje nagłówek HTML'a. | |
*/ | |
void printHeader() { | |
printf("Content-Type: text/html; charset=UTF-8\n\n"); | |
printf("<html>\n"); |
OlderNewer