Cod sursa(job #1349138)
| Utilizator | Data | 20 februarie 2015 00:00:47 | |
|---|---|---|---|
| Problema | Convertor | Scor | 0 |
| Compilator | c | Status | done |
| Runda | rosedu_cdl_2015 | Marime | 0.52 kb |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main(void){
FILE *fin = fopen("convertor.in", "r");
char linie[1024];
int lungime, counting;
lungime = 0;
counting = 0;
char aux;
int i;
while((aux = fgetc(fin)) != EOF){
if(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;
}
