#3625
Scrieți un program fabulos care citește un număr natural nenul n
și determină:
n
n
3
ale lui n
5
n
n
și cifra cea mai semnificativă a lui n
Problema | Prelucrari cifre | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58299482 | Utilizator | |
Fișier | prelucrari_cifre.cpp | Dimensiune | 1.13 KB |
Data încărcării | 26 Mai 2025, 08:19 | Scor / rezultat | Eroare de compilare |
prelucrari_cifre.cpp:38:10: error: 'int hatz::s1(int)' cannot be overloaded int s1(int n) ^ prelucrari_cifre.cpp:8:9: error: with 'int hatz::s1(int)' int s1(int n) ^ prelucrari_cifre.cpp:48:10: error: 'int hatz::s1(int)' cannot be overloaded int s1(int n) ^ prelucrari_cifre.cpp:8:9: error: with 'int hatz::s1(int)' int s1(int n) ^ prelucrari_cifre.cpp:58:10: error: 'int hatz::s1(int)' cannot be overloaded int s1(int n) ^ prelucrari_cifre.cpp:8:9: error: with 'int hatz::s1(int)' int s1(int n) ^ prelucrari_cifre.cpp: In member function 'int hatz::s1(int)': prelucrari_cifre.cpp:12:13: error: 'c' was not declared in this scope c=n%10; ^ prelucrari_cifre.cpp:13:13: error: 'sum1' was not declared in this scope sum1=sum1+(c*c); ^ prelucrari_cifre.cpp:16:16: error: 'sum1' was not declared in this scope return sum1; ^ prelucrari_cifre.cpp: In member function 'int hatz::s2(int)': prelucrari_cifre.cpp:23:13: error: 'c' was not declared in this scope c=n%10; ^ prelucrari_cifre.cpp:25:13: error: 'sum2' was not declared in this scope sum2=sum2+c;} ^ prelucrari_cifre.cpp:28:16: error: 'sum2' was not declared in this scope return sum2; ^ prelucrari_cifre.cpp: In member function 'int hatz::s3(int)': prelucrari_cifre.cpp:36:16: error: 'sum1' was not declared in this scope return sum1; ^ prelucrari_cifre.cpp: In member function 'int hatz::s1(int)': prelucrari_cifre.cpp:42:13: error: 'c' was not declared in this scope c=n%10; ^ prelucrari_cifre.cpp:43:13: error: 'sum1' was not declared in this scope sum1=sum1+(c*c); ^ prelucrari_cifre.cpp:46:16: error: 'sum1' was not declared in this scope return sum1; ^ prelucrari_cifre.cpp: In member function 'int hatz::s1(int)': prelucrari_cifre.cpp:52:13: error: 'c' was not declared in this scope c=n%10; ^ prelucrari_cifre.cpp:53:13: error: 'sum1' was not declared in this scope sum1=sum1+(c*c); ^ prelucrari_cifre.cpp:56:16: error: 'sum1' was not declared in this scope return sum1; ^ prelucrari_cifre.cpp: In member function 'int hatz::s1(int)': prelucrari_cifre.cpp:62:13: error: 'c' was not declared in this scope c=n%10; ^ prelucrari_cifre.cpp:63:13: error: 'sum1' was not declared in this scope sum1=sum1+(c*c); ^ prelucrari_cifre.cpp:66:16: error: 'sum1' was not declared in this scope return sum1; ^ prelucrari_cifre.cpp: In function 'int main()': prelucrari_cifre.cpp:73:10: error: 'n' was not declared in this scope cin>>n; ^ prelucrari_cifre.cpp:72:10: warning: unused variable 'a' [-Wunused-variable] hatz a; ^
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ă.