Добавил:
student_tipo
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:лабораторные работы / от натшки
.docx#include "stdafx.h"
#include "stdio.h"
#include "conio.h"
#include "stdlib.h"
#include "string.h"
#include <iostream>
#define FNAME "D:\\n.txt.\0"\
void main()
{
FILE *f;
char s[56];
int i;
gets(s);
f=fopen(FNAME,"wt");
if (f==NULL)
{
printf ("Error");
getch ();
}
for ( i = 0; i < strlen(s); i++)
{
if (!((s[i] >= '0') && (s[i] <= '9')))
{
fprintf(f, "%c", s[i]);
}
}
fclose(f);
f=fopen(FNAME,"rt");
fgets(s, 56, f);
printf("\n%s\n", s);
fscanf(f,"\n%s\n", s);
getch();
}
Соседние файлы в папке лабораторные работы