Homepage
About me
Teaching
Contact
This is an old revision of the document!
Laboratorium: Funkcje
#include <stdio.h> #include <stdlib.h> void greet(int n) { int i; for (i = 1; i <= n; i = i + 1) { printf("Dzien dobry!\n"); } } int main() { greet(3); return 0; }
#include <stdio.h> #include <stdlib.h> int max(int a, int b) { if (a > b) { return a; } else { return b; } } int main() { int x1 = 4; int x2 = 8; printf("Wieksza z liczb %d i %d to %d.\n", x1, x2, max(x1, x2)); return 0; }