#919
NrCifreZeroRec1
C++
Să se scrie o funcție C++ recursivă care să determine numărul de cifre egale cu zero ale unui număr natural transmis ca parametru și să întoarcă rezultatul prin intermediul unui parametru de ieșire.
Problema | NrCifreZeroRec1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54393453 | Utilizator | |
Fișier | nrcifrezerorec1.cpp | Dimensiune | 215 B |
Data încărcării | 27 Noiembrie 2024, 13:19 | Scor / rezultat | Eroare de compilare |
nrcifrezerorec1.cpp:7:1: error: stray '\302' in program { ^ nrcifrezerorec1.cpp:7:1: error: stray '\240' in program nrcifrezerorec1.cpp:7:1: error: stray '\302' in program nrcifrezerorec1.cpp:7:1: error: stray '\240' in program nrcifrezerorec1.cpp:8:1: error: stray '\302' in program nr_cif_zero(n/10,nr); ^ nrcifrezerorec1.cpp:8:1: error: stray '\240' in program nrcifrezerorec1.cpp:8:1: error: stray '\302' in program nrcifrezerorec1.cpp:8:1: error: stray '\240' in program nrcifrezerorec1.cpp:9:1: error: stray '\302' in program if(n%10==0) ^ nrcifrezerorec1.cpp:9:1: error: stray '\240' in program nrcifrezerorec1.cpp:9:1: error: stray '\302' in program nrcifrezerorec1.cpp:9:1: error: stray '\240' in program nrcifrezerorec1.cpp:9:1: error: stray '\302' in program nrcifrezerorec1.cpp:9:1: error: stray '\240' in program nrcifrezerorec1.cpp:9:1: error: stray '\302' in program nrcifrezerorec1.cpp:9:1: error: stray '\240' in program nrcifrezerorec1.cpp:10:1: error: stray '\302' in program nr++; ^ nrcifrezerorec1.cpp:10:1: error: stray '\240' in program nrcifrezerorec1.cpp:10:1: error: stray '\302' in program nrcifrezerorec1.cpp:10:1: error: stray '\240' in program nrcifrezerorec1.cpp:10:1: error: stray '\302' in program nrcifrezerorec1.cpp:10:1: error: stray '\240' in program nrcifrezerorec1.cpp:10:1: error: stray '\302' in program nrcifrezerorec1.cpp:10:1: error: stray '\240' in program nrcifrezerorec1.cpp:10:1: error: stray '\302' in program nrcifrezerorec1.cpp:10:1: error: stray '\240' in program nrcifrezerorec1.cpp:10:1: error: stray '\302' in program nrcifrezerorec1.cpp:10:1: error: stray '\240' in program nrcifrezerorec1.cpp:11:1: error: stray '\302' in program } ^ nrcifrezerorec1.cpp:11:1: error: stray '\240' in program nrcifrezerorec1.cpp:11:1: error: stray '\302' in program nrcifrezerorec1.cpp:11:1: error: stray '\240' in program nrcifrezerorec1.cpp:13:1: error: stray '\302' in program if(n==0) ^ nrcifrezerorec1.cpp:13:1: error: stray '\240' in program nrcifrezerorec1.cpp:13:1: error: stray '\302' in program nrcifrezerorec1.cpp:13:1: error: stray '\240' in program nrcifrezerorec1.cpp:14:1: error: stray '\302' in program nr=1; ^ nrcifrezerorec1.cpp:14:1: error: stray '\240' in program nrcifrezerorec1.cpp:14:1: error: stray '\302' in program nrcifrezerorec1.cpp:14:1: error: stray '\240' in program nrcifrezerorec1.cpp:14:1: error: stray '\302' in program nrcifrezerorec1.cpp:14:1: error: stray '\240' in program nrcifrezerorec1.cpp:14:1: error: stray '\302' in program nrcifrezerorec1.cpp:14:1: error: stray '\240' in program nrcifrezerorec1.cpp:15:1: error: stray '\302' in program else ^ nrcifrezerorec1.cpp:15:1: error: stray '\240' in program nrcifrezerorec1.cpp:15:1: error: stray '\302' in program nrcifrezerorec1.cpp:15:1: error: stray '\240' in program nrcifrezerorec1.cpp:16:1: error: stray '\302' in program nr=0; ^ nrcifrezerorec1.cpp:16:1: error: stray '\240' in program nrcifrezerorec1.cpp:16:1: error: stray '\302' in program nrcifrezerorec1.cpp:16:1: error: stray '\240' in program nrcifrezerorec1.cpp:16:1: error: stray '\302' in program nrcifrezerorec1.cpp:16:1: error: stray '\240' in program nrcifrezerorec1.cpp:16:1: error: stray '\302' in program nrcifrezerorec1.cpp:16:1: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrCifreZeroRec1 face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.