School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1,30 @@
#include<stdio.h>
int main(){
FILE *fp;
char ch;
int length;
fp = fopen("homework.txt","r+");
if(fp == NULL){
printf("File does not exist!");
return -1;
}
while((ch = fgetc(fp)) != EOF){
if(ch >= '0' && ch <= '9'){
length++;
}
else if(ch == ' ' && length!=0){
fseek(fp,ftell(fp)-length,SEEK_SET);
fputc('|',fp);
while(length>0){
fputc('s',fp);
length--;
}
}
else
{
length=0;
}
}
fclose(fp);
return 0;
}