#4314
Cifre16
Să se scrie un program care citește un număr natural și determină câte cifre ale numărului sunt mai mici decât prima sa cifră.
Problema | Cifre16 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #43909980 | Utilizator | |
Fișier | cifre16.cpp | Dimensiune | 624 B |
Data încărcării | 26 Mai 2023, 10:49 | Scor / rezultat | Eroare de compilare |
cifre16.cpp:1:7: error: expected nested-name-specifier before 'System' using System; ^ cifre16.cpp:1:7: error: 'System' has not been declared cifre16.cpp:2:7: error: expected nested-name-specifier before 'System' using System.Collections.Generic; ^ cifre16.cpp:2:7: error: 'System' has not been declared cifre16.cpp:2:13: error: expected ';' before '.' token using System.Collections.Generic; ^ cifre16.cpp:2:13: error: expected unqualified-id before '.' token cifre16.cpp:3:7: error: expected nested-name-specifier before 'System' using System.Linq; ^ cifre16.cpp:3:7: error: 'System' has not been declared cifre16.cpp:3:13: error: expected ';' before '.' token using System.Linq; ^ cifre16.cpp:3:13: error: expected unqualified-id before '.' token cifre16.cpp:4:7: error: expected nested-name-specifier before 'System' using System.Text; ^ cifre16.cpp:4:7: error: 'System' has not been declared cifre16.cpp:4:13: error: expected ';' before '.' token using System.Text; ^ cifre16.cpp:4:13: error: expected unqualified-id before '.' token cifre16.cpp:5:7: error: expected nested-name-specifier before 'System' using System.Threading.Tasks; ^ cifre16.cpp:5:7: error: 'System' has not been declared cifre16.cpp:5:13: error: expected ';' before '.' token using System.Threading.Tasks; ^ cifre16.cpp:5:13: error: expected unqualified-id before '.' token cifre16.cpp:9:22: error: 'string' has not been declared static void Main(string[] args) ^ cifre16.cpp:9:31: error: expected ',' or '...' before 'args' static void Main(string[] args) ^ cifre16.cpp:31:1: error: expected ';' after class definition } ^ cifre16.cpp: In static member function 'static void Program::Main(int*)': cifre16.cpp:11:21: error: expected primary-expression before 'int' int numar = int.Parse(Console.ReadLine()); ^ cifre16.cpp:13:32: error: request for member 'ToString' in 'numar', which is of non-class type 'int' int primaCifra = numar.ToString()[0] - '0'; // Obținem prima cifră a numărului ^ cifre16.cpp:29:9: error: 'Console' was not declared in this scope Console.WriteLine(count); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cifre16 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ă.