#244
CifreOrd
Se dau n
cifre zecimale. Să se afişeze aceste cifre în ordine crescătoare.
Problema | CifreOrd | Operații I/O |
cifreord.in /cifreord.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #44317616 | Utilizator | |
Fișier | cifreord.c | Dimensiune | 543 B |
Data încărcării | 31 Iulie 2023, 21:48 | Scor / rezultat | Eroare de compilare |
cifreord.c: In function 'main': cifreord.c:6:2: warning: passing argument 1 of 'fopen' from incompatible pointer type [enabled by default] f=fopen(f, "cifreord.in", "r"); ^ In file included from cifreord.c:1:0: /usr/include/stdio.h:272:14: note: expected 'const char * restrict' but argument is of type 'struct FILE *' extern FILE *fopen (const char *__restrict __filename, ^ cifreord.c:6:2: error: too many arguments to function 'fopen' f=fopen(f, "cifreord.in", "r"); ^ In file included from cifreord.c:1:0: /usr/include/stdio.h:272:14: note: declared here extern FILE *fopen (const char *__restrict __filename, ^ cifreord.c:7:2: warning: passing argument 1 of 'fopen' from incompatible pointer type [enabled by default] g=fopen(g, "cifreord.out", "w"); ^ In file included from cifreord.c:1:0: /usr/include/stdio.h:272:14: note: expected 'const char * restrict' but argument is of type 'struct FILE *' extern FILE *fopen (const char *__restrict __filename, ^ cifreord.c:7:2: error: too many arguments to function 'fopen' g=fopen(g, "cifreord.out", "w"); ^ In file included from cifreord.c:1:0: /usr/include/stdio.h:272:14: note: declared here extern FILE *fopen (const char *__restrict __filename, ^ cifreord.c:10:8: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f, "%d", &n); ^ cifreord.c:16:9: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f, "%d", &temp); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreOrd 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ă.