#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 | #12430841 | Utilizator | |
Fișier | sum00.c | Dimensiune | 121 B |
Data încărcării | 29 Noiembrie 2018, 18:36 | Scor / rezultat | 0 puncte |
sum00.c: In function 'main': sum00.c:6:5: warning: passing argument 1 of 'scanf' from incompatible pointer type [enabled by default] scanf(&a); ^ In file included from /usr/include/features.h:374:0, from /usr/include/stdio.h:27, from sum00.c:1: /usr/include/stdio.h:446:12: note: expected 'const char * __restrict__' but argument is of type 'int *' extern int __REDIRECT (scanf, (const char *__restrict __format, ...), ^ sum00.c:6:5: warning: format not a string literal and no format arguments [-Wformat-security] scanf(&a); ^ sum00.c:7:5: warning: passing argument 1 of 'scanf' from incompatible pointer type [enabled by default] scanf(&b); ^ In file included from /usr/include/features.h:374:0, from /usr/include/stdio.h:27, from sum00.c:1: /usr/include/stdio.h:446:12: note: expected 'const char * __restrict__' but argument is of type 'int *' extern int __REDIRECT (scanf, (const char *__restrict __format, ...), ^ sum00.c:7:5: warning: format not a string literal and no format arguments [-Wformat-security] scanf(&b); ^ sum00.c:6:10: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf(&a); ^ sum00.c:7:10: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf(&b); ^ sum00.c:10:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
2 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
3 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
4 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
5 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
6 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
7 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
8 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
9 | 0 secunde | Exited with error status 10 | 10 | 0 | Exemplu | |
10 | 0 secunde | Exited with error status 10 | 10 | 0 | ||
Punctaj total | 0 |
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ă.