#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 | #43606980 | Utilizator | |
Fișier | sum00.c | Dimensiune | 635 B |
Data încărcării | 05 Mai 2023, 17:52 | Scor / rezultat | 100 puncte |
sum00.c: In function 'f11': sum00.c:4:170: warning: passing argument 1 of 'fprintf' from incompatible pointer type [enabled by default] typedef struct s0 s0;int32_t f9(intptr_t);int32_t f10(uintptr_t);int32_t f13(uintptr_t);int32_t f11(char*);int32_t f12(intptr_t);int32_t main();int32_t f8(char*);struct s0{};int32_t f9(intptr_t(v0)){return printf("%d",v0);}int32_t f10(uintptr_t(v0)){return printf("%u",v0);}int32_t f13(uintptr_t(v0)){return printf("%u",v0);}int32_t f11(char(*(v0))){return fprintf("%s",v0);}int32_t f12(intptr_t(v0)){return printf("%d",v0);}int32_t main(){int32_t(v0)=0;int32_t(v1)=0;scanf("%d",&(v0));scanf("%d",&(v1));f9((v0)+(v1));return 0;}int32_t f8(char(*(v0))){return printf("%s",v0);} ^ In file included from /usr/include/stdio.h:937:0, from sum00.c:3: /usr/include/i386-linux-gnu/bits/stdio2.h:95:1: note: expected 'struct FILE * restrict' but argument is of type 'char *' fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...) ^ sum00.c:4:170: warning: format not a string literal and no format arguments [-Wformat-security] typedef struct s0 s0;int32_t f9(intptr_t);int32_t f10(uintptr_t);int32_t f13(uintptr_t);int32_t f11(char*);int32_t f12(intptr_t);int32_t main();int32_t f8(char*);struct s0{};int32_t f9(intptr_t(v0)){return printf("%d",v0);}int32_t f10(uintptr_t(v0)){return printf("%u",v0);}int32_t f13(uintptr_t(v0)){return printf("%u",v0);}int32_t f11(char(*(v0))){return fprintf("%s",v0);}int32_t f12(intptr_t(v0)){return printf("%d",v0);}int32_t main(){int32_t(v0)=0;int32_t(v1)=0;scanf("%d",&(v0));scanf("%d",&(v1));f9((v0)+(v1));return 0;}int32_t f8(char(*(v0))){return printf("%s",v0);} ^ sum00.c: In function 'main': sum00.c:4:474: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] typedef struct s0 s0;int32_t f9(intptr_t);int32_t f10(uintptr_t);int32_t f13(uintptr_t);int32_t f11(char*);int32_t f12(intptr_t);int32_t main();int32_t f8(char*);struct s0{};int32_t f9(intptr_t(v0)){return printf("%d",v0);}int32_t f10(uintptr_t(v0)){return printf("%u",v0);}int32_t f13(uintptr_t(v0)){return printf("%u",v0);}int32_t f11(char(*(v0))){return fprintf("%s",v0);}int32_t f12(intptr_t(v0)){return printf("%d",v0);}int32_t main(){int32_t(v0)=0;int32_t(v1)=0;scanf("%d",&(v0));scanf("%d",&(v1));f9((v0)+(v1));return 0;}int32_t f8(char(*(v0))){return printf("%s",v0);} ^ sum00.c:4:492: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] typedef struct s0 s0;int32_t f9(intptr_t);int32_t f10(uintptr_t);int32_t f13(uintptr_t);int32_t f11(char*);int32_t f12(intptr_t);int32_t main();int32_t f8(char*);struct s0{};int32_t f9(intptr_t(v0)){return printf("%d",v0);}int32_t f10(uintptr_t(v0)){return printf("%u",v0);}int32_t f13(uintptr_t(v0)){return printf("%u",v0);}int32_t f11(char(*(v0))){return fprintf("%s",v0);}int32_t f12(intptr_t(v0)){return printf("%d",v0);}int32_t main(){int32_t(v0)=0;int32_t(v1)=0;scanf("%d",&(v0));scanf("%d",&(v1));f9((v0)+(v1));return 0;}int32_t f8(char(*(v0))){return printf("%s",v0);} ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | ||
3 | 0 secunde | OK. | 10 | 10 | ||
4 | 0 secunde | OK. | 10 | 10 | ||
5 | 0 secunde | OK. | 10 | 10 | ||
6 | 0 secunde | OK. | 10 | 10 | ||
7 | 0 secunde | OK. | 10 | 10 | ||
8 | 0 secunde | OK. | 10 | 10 | ||
9 | 0 secunde | OK. | 10 | 10 | Exemplu | |
10 | 0 secunde | OK. | 10 | 10 | ||
Punctaj total | 100 |
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ă.