Сделал задание 25 по ЭВМ
This commit is contained in:
commit
05ce9de374
3 changed files with 79 additions and 0 deletions
20
main.c
Normal file
20
main.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
#include <stdio.h>
|
||||
#include "count_func.h"
|
||||
|
||||
int main(void) {
|
||||
FILE * file;
|
||||
char filename[50];
|
||||
|
||||
printf("Enter filename: ");
|
||||
scanf("%s", filename);
|
||||
|
||||
file = fopen(filename, "r");
|
||||
if (file == NULL) {
|
||||
printf("Error file!\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
printf("Answer: %d", countWords(file));
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue