#3625
Scrieți un program fabulos care citește un număr natural nenul n și determină:
nn3 ale lui n5nn și cifra cea mai semnificativă a lui n| Problema | Prelucrari cifre | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63848548 | Utilizator | |
| Fișier | prelucrari_cifre.cpp | Dimensiune | 748 B |
| Data încărcării | 22 Martie 2026, 12:17 | Scor/rezultat | Eroare de compilare |
prelucrari_cifre.cpp: In function 'int main()': prelucrari_cifre.cpp:12:2: error: 'longlong' was not declared in this scope {longlong n,a=0,b=0,c=0,d=0,e=1,f=0,x,y,t,cn; ^ prelucrari_cifre.cpp:12:11: error: expected ';' before 'n' {longlong n,a=0,b=0,c=0,d=0,e=1,f=0,x,y,t,cn; ^ prelucrari_cifre.cpp:13:6: error: 'n' was not declared in this scope cin>>n; ^ prelucrari_cifre.cpp:14:1: error: 'cn' was not declared in this scope cn=n; ^ prelucrari_cifre.cpp:16:2: error: 'x' was not declared in this scope {x=n%10; ^ prelucrari_cifre.cpp:17:1: error: 'a' was not declared in this scope a=a+x*x; ^ prelucrari_cifre.cpp:19:2: error: 'b' was not declared in this scope {b=b+x;} ^ prelucrari_cifre.cpp:21:2: error: 'c' was not declared in this scope {c=c+x;} ^ prelucrari_cifre.cpp:23:2: error: 'd' was not declared in this scope {d=d+1;} ^ prelucrari_cifre.cpp:25:2: error: 'e' was not declared in this scope {e=e*x;} ^ prelucrari_cifre.cpp:28:1: error: 't' was not declared in this scope t=cn%10; ^ prelucrari_cifre.cpp:31:1: error: 'y' was not declared in this scope y=cn; ^ prelucrari_cifre.cpp:32:1: error: 'f' was not declared in this scope f=y+t; ^ prelucrari_cifre.cpp:34:7: error: 'a' was not declared in this scope cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<f<<" " ; ^ prelucrari_cifre.cpp:34:15: error: 'b' was not declared in this scope cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<f<<" " ; ^ prelucrari_cifre.cpp:34:23: error: 'c' was not declared in this scope cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<f<<" " ; ^ prelucrari_cifre.cpp:34:31: error: 'd' was not declared in this scope cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<f<<" " ; ^ prelucrari_cifre.cpp:34:39: error: 'e' was not declared in this scope cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<f<<" " ; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Prelucrari cifre 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ă.