Pagini recente » Cod sursa (job #1309018) | Cod sursa (job #1252296) | Cod sursa (job #3218139) | Cod sursa (job #2644016) | Cod sursa (job #1349149)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main(void){
FILE *fin = fopen("convertor.in", "r");
FILE *fout = fopen("convertor.out", "w");
char linie[1024];
int lungime, counting;
lungime = 0;
counting = 0;
char aux;
int i;
while((aux = fgetc(fin)) != EOF){
if(counting == 0 && aux == '{'){
lungime = 0;
counting = 1;
}
if(aux != '\n' && counting == 1){
linie[lungime] = aux;
lungime++;
}
if(aux == '}' && counting == 1){
counting = 0;
printf("%s\n", linie);
// memset(linie, '\0', 1024);
}
}
return 0;
}