#2081
Parsare
C++
Se citesc numere până când nu mai este niciun număr de citit. Se cere să se afișeze valoarea maximă dintre acestea.
Problema | Parsare | Operații I/O |
parsare.in /parsare.out
|
---|---|---|---|
Limita timp | 0.7 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54652621 | Utilizator | |
Fișier | parsare.cpp | Dimensiune | 725 B |
Data încărcării | 04 Decembrie 2024, 17:32 | Scor / rezultat | Eroare de compilare |
parsare.cpp:41:3: error: stray '\342' in program while (ceof!=’\0’) { ^ parsare.cpp:41:3: error: stray '\200' in program parsare.cpp:41:3: error: stray '\231' in program parsare.cpp:41:3: error: stray '\' in program parsare.cpp:41:3: error: stray '\342' in program parsare.cpp:41:3: error: stray '\200' in program parsare.cpp:41:3: error: stray '\231' in program parsare.cpp: In function 'char read_ch()': parsare.cpp:5:8: error: 'f' was not declared in this scope ch=f.get(); ^ parsare.cpp:7:18: error: 'isdigit' was not declared in this scope if (isdigit(ch) || isalpha(ch) || strchr(" .,+-", ch)) ^ parsare.cpp:7:33: error: 'isalpha' was not declared in this scope if (isdigit(ch) || isalpha(ch) || strchr(" .,+-", ch)) ^ parsare.cpp:7:56: error: 'strchr' was not declared in this scope if (isdigit(ch) || isalpha(ch) || strchr(" .,+-", ch)) ^ parsare.cpp: In function 'int Citeste()': parsare.cpp:18:31: error: 'isdigit' was not declared in this scope while (!isdigit(c = read_ch()) && c != '-'); ^ parsare.cpp:21:3: error: 'n' was not declared in this scope n = 0; ^ parsare.cpp:25:3: error: 'n' was not declared in this scope n = c - '0'; ^ parsare.cpp:27:30: error: 'isdigit' was not declared in this scope while (isdigit(c = read_ch())) { ^ parsare.cpp:28:3: error: 'n' was not declared in this scope n = 10 * n + (c - '0'); ^ parsare.cpp:30:2: error: 'n' was not declared in this scope n *= sgn; ^ parsare.cpp: In function 'int main()': parsare.cpp:36:2: error: 'ifstream' was not declared in this scope ifstream f("parsare.in"); ^ parsare.cpp:36:11: error: expected ';' before 'f' ifstream f("parsare.in"); ^ parsare.cpp:37:2: error: 'ofstream' was not declared in this scope ofstream g("parsare.out"); ^ parsare.cpp:37:11: error: expected ';' before 'g' ofstream g("parsare.out"); ^ parsare.cpp:46:4: error: 'g' was not declared in this scope g << nrmaxim; ^ parsare.cpp:48:2: error: 'f' was not declared in this scope f.close(); ^ parsare.cpp: In function 'char read_ch()': parsare.cpp:13:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ parsare.cpp: In function 'int Citeste()': parsare.cpp:32:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Parsare face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.