school/oldmain.c

30 lines
463 B
C
Raw Normal View History

2023-11-27 15:32:21 +01:00
#include <stdio.h>
#include <stdint.h>
FILE *fp;
char c;
int a;
2024-01-22 14:41:15 +01:00
int oldmain() {
2023-11-27 15:32:21 +01:00
fp = fopen("test.txt", "r");
2024-01-22 14:41:15 +01:00
while (!feof(fp)) {
2023-11-27 15:32:21 +01:00
c = fgetc(fp);
printf("%c", c);
}
fclose(fp);
printf("\nSEPARATOR\n\n");
2024-01-22 14:41:15 +01:00
for (uint8_t i = 0; i <= 10; i++) {
2023-11-27 15:32:21 +01:00
printf("hello %i times\n", i);
}
printf("\nSEPARATOR\n\n");
printf("Zadajte integer:");
scanf("%d", &a);
printf("Zadali ste %d.", a);
return 0;
}