#3596
Cifre_romane2
Alexandru a invatat ca pe langa cifrele romane I
, V
, X
, L
, C
, D
, M
mai exista cifrele (V)
, (X)
, (L)
, (C)
, (D)
, (M)
care au valorile 5000
, 10000
, 50000
, 100000
, 500000
respectiv 1000000
. Dandu-se un numar c
:
c=1
, se da un numar scris cu cifre arabe si trebuie sa-l scrieti cu cifre romane.c=2
, se da un numar scris cu cifre romane si trebuie sa-l scrieti cu cifre arabe.proprie
Problema | Cifre_romane2 | Operații I/O |
cifre_romane2.in /cifre_romane2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52789111 | Utilizator | |
Fișier | cifre_romane2.cpp | Dimensiune | 5.84 KB |
Data încărcării | 09 Octombrie 2024, 14:35 | Scor / rezultat | Eroare de compilare |
cifre_romane2.cpp: In function 'int main()': cifre_romane2.cpp:127:24: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[0] == "("){ ^ cifre_romane2.cpp:127:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:128:28: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[1] == "M"){ ^ cifre_romane2.cpp:128:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:132:33: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[1] == "D"){ ^ cifre_romane2.cpp:132:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:136:33: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[1] == "C"){ ^ cifre_romane2.cpp:136:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:137:30: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[4]=="M"){ ^ cifre_romane2.cpp:137:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:140:37: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[4] == "D"){ ^ cifre_romane2.cpp:140:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:151:33: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[1] == "L"){ ^ cifre_romane2.cpp:151:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:155:33: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[1] == "X"){ ^ cifre_romane2.cpp:155:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:156:30: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[4]=="C"){ ^ cifre_romane2.cpp:156:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:160:37: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[4] == "L"){ ^ cifre_romane2.cpp:160:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:171:33: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[1] == "V"){ ^ cifre_romane2.cpp:171:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:178:28: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[0] == "M"){ ^ cifre_romane2.cpp:178:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:179:30: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[2]=="X"){ ^ cifre_romane2.cpp:179:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:183:37: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[2] == "V"){ ^ cifre_romane2.cpp:183:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:194:33: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[0] == "C"){ ^ cifre_romane2.cpp:194:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:195:30: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[1]=="M"){ ^ cifre_romane2.cpp:195:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:199:37: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[1] == "D"){ ^ cifre_romane2.cpp:199:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:209:33: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[0] == "X"){ ^ cifre_romane2.cpp:209:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:210:30: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[1]=="C"){ ^ cifre_romane2.cpp:210:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:214:37: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[1] == "L"){ ^ cifre_romane2.cpp:214:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:224:33: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[0] == "I"){ ^ cifre_romane2.cpp:224:33: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:225:30: warning: comparison with string literal results in unspecified behaviour [-Waddress] if(p[1]=="X"){ ^ cifre_romane2.cpp:225:30: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] cifre_romane2.cpp:229:37: warning: comparison with string literal results in unspecified behaviour [-Waddress] else if(p[1] == "V"){ ^ cifre_romane2.cpp:229:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cifre_romane2 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ă.