#939
sum00
Să se scrie un program care citeşte de la tastatura două numere naturale şi determină suma lor.
Problema | sum00 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49350466 | Utilizator | |
Fișier | sum00.cpp | Dimensiune | 1.13 KB |
Data încărcării | 27 Februarie 2024, 11:27 | Scor / rezultat | Eroare de compilare |
sum00.cpp:2:15: error: empty character constant userMsg db '' ;Ask the user to enter a number ^ sum00.cpp:4:15: error: empty character constant dispMsg db '' ^ sum00.cpp:1:1: error: 'section' does not name a type section .data ;Data segment ^ sum00.cpp:1:42: error: 'Data' does not name a type section .data ;Data segment ^ sum00.cpp:2:19: error: 'Ask' does not name a type userMsg db '' ;Ask the user to enter a number ^ sum00.cpp:3:42: error: 'The' does not name a type lenUserMsg equ $-userMsg ;The length of the message ^ sum00.cpp:7:25: error: 'Uninitialized' does not name a type section .bss ;Uninitialized data ^ sum00.cpp:12:25: error: 'Code' does not name a type section .text ;Code Segment ^ sum00.cpp:15:25: error: 'User' does not name a type _start: ;User prompt ^ sum00.cpp:22:5: error: 'Read' does not name a type ;Read and store the user input ^ sum00.cpp:26:25: error: expected unqualified-id before numeric constant mov edx, 5 ;5 bytes (numeric, 1 for sign) of that information ^ sum00.cpp:29:5: error: 'Read' does not name a type ;Read and store the user input ^ sum00.cpp:33:25: error: expected unqualified-id before numeric constant mov edx, 5 ;5 bytes (numeric, 1 for sign) of that information ^ sum00.cpp:37:16: error: 'convert' does not name a type sub eax, '0' ;convert from ASCII to decimal ^ sum00.cpp:44:5: error: 'Output' does not name a type ;Output the number entered ^ sum00.cpp:51:6: error: 'Exit' does not name a type ; Exit code ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sum00 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ă.