#371
Numarare
Se citesc n
numere naturale. Determinați câte perechi de numere citite consecutiv au aceeași sumă a cifrelor.
Problema | Numarare | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53235214 | Utilizator | |
Fișier | numarare.cpp | Dimensiune | 472 B |
Data încărcării | 22 Octombrie 2024, 09:03 | Scor / rezultat | Eroare de compilare |
numarare.cpp: In function 'int main()': numarare.cpp:8:5: error: expected initializer before 'cin' cin>>n;l ^ numarare.cpp:8:12: error: 'l' was not declared in this scope cin>>n;l ^ numarare.cpp:9:5: error: expected ';' before 'nr' nr=0; ^ numarare.cpp:10:10: error: 'a' was not declared in this scope cin>>a; ^ numarare.cpp:11:5: error: 'sca' was not declared in this scope sca=0; ^ numarare.cpp:14:9: error: 'c' was not declared in this scope c=a%10; ^ numarare.cpp:18:9: error: 'i' was not declared in this scope for(i=2;i>=nl;i++) ^ numarare.cpp:18:16: error: 'nl' was not declared in this scope for(i=2;i>=nl;i++) ^ numarare.cpp:20:18: error: 'b' was not declared in this scope cin>>b; ^ numarare.cpp:21:13: error: 'scb' was not declared in this scope scb=0; ^ numarare.cpp:23:17: error: 'c' was not declared in this scope c=b%10; ^ numarare.cpp:24:25: error: 'c' was not declared in this scope scb=scb+c; ^ numarare.cpp:27:17: error: 'scb' was not declared in this scope if(sca==scb) ^ numarare.cpp:28:13: error: 'nr' was not declared in this scope nr++; ^ numarare.cpp:29:15: error: 'nr' was not declared in this scope cout<<nr; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Numarare 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ă.