30 lines
562 B
C
30 lines
562 B
C
//
|
|
// Created by faizi on 02.11.2025.
|
|
//
|
|
#include <stdio.h>
|
|
#include "input.h"
|
|
|
|
int main(void)
|
|
{
|
|
FILE *file = fopen("words.txt", "r");
|
|
if (file == NULL)
|
|
{
|
|
printf("Fehler: Datei konnte nicht geöffnet werden.\n");
|
|
return 1;
|
|
}
|
|
|
|
char words[100][MAX_WORD_LEN];
|
|
int count = readWords(file, words, 100);
|
|
fclose(file);
|
|
|
|
printf("Eingelesene Wörter: %d\n", count);
|
|
printf("---------------------------\n");
|
|
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
printf("%2d: %s\n", i + 1, words[i]);
|
|
}
|
|
|
|
return 0;
|
|
}
|