#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #49205903 | Utilizator | |
Fișier | sum00.cpp | Dimensiune | 2.19 KB |
Data încărcării | 20 Februarie 2024, 09:51 | Scor / rezultat | 0 puncte |
sum00.cpp: In function 'nod* creare_fisier()': sum00.cpp:26:28: warning: format '%s' expects argument of type 'char*', but argument 3 has type 'char (*)[200]' [-Wformat=] fscanf(f,"%s",&q->s); ^ sum00.cpp: In function 'nod* creare()': sum00.cpp:50:25: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'char (*)[200]' [-Wformat=] scanf("%s",&q->s); ^ sum00.cpp: In function 'void caut_element(nod*&, char*)': sum00.cpp:111:28: warning: format '%s' expects argument of type 'char*', but argument 2 has type 'nod*' [-Wformat=] printf("%s\n",p); ^ sum00.cpp:105:10: warning: unused variable 'q' [-Wunused-variable] nod *q = new nod; ^ sum00.cpp: In function 'int main()': sum00.cpp:132:5: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(s); ^ sum00.cpp:132:11: warning: 'char* gets(char*)' is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(s); ^ sum00.cpp: In function 'nod* creare_fisier()': sum00.cpp:26:29: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%s",&q->s); ^ sum00.cpp: In function 'nod* creare()': sum00.cpp:50:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result] scanf("%s",&q->s); ^ sum00.cpp: In function 'int main()': sum00.cpp:132:12: warning: ignoring return value of 'char* gets(char*)', declared with attribute warn_unused_result [-Wunused-result] gets(s); ^ /tmp/cc4gC3AF.o: In function \`main': sum00.cpp:(.text.startup+0x29): warning: the \`gets' function is dangerous and should not be used.
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
2 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
3 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
4 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
5 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
6 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
7 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
8 | 0 secunde | Caught fatal signal 11 | 10 | 0 | ||
9 | 0 secunde | Caught fatal signal 11 | 10 | 0 | Exemplu | |
10 | 0 secunde | Caught fatal signal 11 | 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ă.