#3625
Prelucrari cifre
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 | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #38879531 | Utilizator | |
Fișier | prelucrari_cifre.cpp | Dimensiune | 1.04 KB |
Data încărcării | 19 Octombrie 2022, 16:33 | Scor / rezultat | Eroare de compilare |
prelucrari_cifre.cpp: In function 'void Prelucrari(int)': prelucrari_cifre.cpp:7:11: error: 'n' was not declared in this scope uc=n%10; ^ prelucrari_cifre.cpp:11:8: error: 'cout' was not declared in this scope cout<<s<<" "; ^ prelucrari_cifre.cpp:3:14: warning: unused variable 'si' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:3:17: warning: unused variable 'sd' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:3:20: warning: unused variable 'nr' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:3:23: warning: unused variable 'p' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp: In function 'void Prelucrari1(int)': prelucrari_cifre.cpp:20:11: error: 'n' was not declared in this scope uc=n%10; ^ prelucrari_cifre.cpp:28:8: error: 'cout' was not declared in this scope cout<<si<<" "; ^ prelucrari_cifre.cpp:16:17: warning: unused variable 'sd' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:16:20: warning: unused variable 'nr' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:16:23: warning: unused variable 'p' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp: In function 'void Prelucrari2(int)': prelucrari_cifre.cpp:37:11: error: 'n' was not declared in this scope uc=n%10; ^ prelucrari_cifre.cpp:45:8: error: 'cout' was not declared in this scope cout<<sd<<" "; ^ prelucrari_cifre.cpp:33:14: warning: unused variable 'si' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:33:20: warning: unused variable 'nr' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:33:23: warning: unused variable 'p' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp: In function 'void Prelucrari3(int)': prelucrari_cifre.cpp:54:11: error: 'n' was not declared in this scope uc=n%10; ^ prelucrari_cifre.cpp:62:8: error: 'cout' was not declared in this scope cout<<nr<<" "; ^ prelucrari_cifre.cpp:50:14: warning: unused variable 'si' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:50:17: warning: unused variable 'sd' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:50:23: warning: unused variable 'p' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp: In function 'void Prelucrari4(int)': prelucrari_cifre.cpp:71:11: error: 'n' was not declared in this scope uc=n%10; ^ prelucrari_cifre.cpp:78:8: error: 'cout' was not declared in this scope cout<<p<< " "; ^ prelucrari_cifre.cpp:67:14: warning: unused variable 'si' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:67:17: warning: unused variable 'sd' [-Wunused-variable] int uc,s,si,sd,nr,p; ^ prelucrari_cifre.cpp:67:20: warning: unused variable 'nr' [-Wunused-variable] int uc,s,si,sd,nr,p; ^
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ă.