Cod sursa(job #1737889)

Utilizator ionanghelinaIonut Anghelina ionanghelina Data 5 august 2016 11:04:16
Problema Secventa 3 Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.56 kb

int number () {

    int nr = 0;
    while (buffer[P] < '0' || buffer[P] > '9') {
        P++;
        if (P == DIMB) {
            P = 0;
            fread (buffer, 1, DIMB, fin);
        }
    }
    while (buffer[P] >= '0' && buffer[P] <= '9') {
        nr = nr * 10 + buffer[P] - '0';
        P++;
        if (P == DIMB) {
            P = 0;
            fread (buffer, 1, DIMB, fin);
        }
    }

    return nr;
}

int main () {





    fread (buffer, 1, DIMB, fin);


    //fin>>n;
    //fscanf(fin,"%d",&n);
    n = number();