#2263
O firmă are două tipuri de camioane: camioane de tipul 1, care pot transporta câte t1 tone de marfă pe zi, și camioane de tipul 2, care pot transporta câte t2 tone de marfă pe zi.
Știind că firma are n camioane de tipul 1 și m camioane de tipul 2, câte tone de marfă pot transporta camioanele firmei în z zile.
| Problema | Camioane | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #11422551 | Utilizator | |
| Fișier | camioane.c | Dimensiune | 400 B |
| Data încărcării | 28 Octombrie 2018, 17:58 | Scor/rezultat | Eroare de compilare |
camioane.c: In function 'citire_date': camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 2 has type 'int **' [-Wformat=] scanf("%d %d %d %d %d", &t1, &t2, &n, &m, &z); ^ camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 3 has type 'int **' [-Wformat=] camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 4 has type 'int **' [-Wformat=] camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 5 has type 'int **' [-Wformat=] camioane.c:6:5: warning: format '%d' expects argument of type 'int *', but argument 6 has type 'int **' [-Wformat=] camioane.c: In function 'main': camioane.c:18:5: warning: passing argument 1 of 'citire_date' makes pointer from integer without a cast [enabled by default] citire_date(t1, t2, n, m); ^ camioane.c:4:6: note: expected 'int *' but argument is of type 'int' void citire_date(int *t1, int *t2, int *n, int *m, int *z) ^ camioane.c:18:5: warning: passing argument 2 of 'citire_date' makes pointer from integer without a cast [enabled by default] citire_date(t1, t2, n, m); ^ camioane.c:4:6: note: expected 'int *' but argument is of type 'int' void citire_date(int *t1, int *t2, int *n, int *m, int *z) ^ camioane.c:18:5: warning: passing argument 3 of 'citire_date' makes pointer from integer without a cast [enabled by default] citire_date(t1, t2, n, m); ^ camioane.c:4:6: note: expected 'int *' but argument is of type 'int' void citire_date(int *t1, int *t2, int *n, int *m, int *z) ^ camioane.c:18:5: warning: passing argument 4 of 'citire_date' makes pointer from integer without a cast [enabled by default] citire_date(t1, t2, n, m); ^ camioane.c:4:6: note: expected 'int *' but argument is of type 'int' void citire_date(int *t1, int *t2, int *n, int *m, int *z) ^ camioane.c:18:5: error: too few arguments to function 'citire_date' citire_date(t1, t2, n, m); ^ camioane.c:4:6: note: declared here void citire_date(int *t1, int *t2, int *n, int *m, int *z) ^ camioane.c:20:5: warning: passing argument 1 of 'tone_transportate' makes integer from pointer without a cast [enabled by default] printf("%d", tone_transportate(&t1, &t2, &n, &m, &z)); ^ camioane.c:10:5: note: expected 'int' but argument is of type 'int *' int tone_transportate(int t1, int t2, int n, int m, int z) ^ camioane.c:20:5: warning: passing argument 2 of 'tone_transportate' makes integer from pointer without a cast [enabled by default] printf("%d", tone_transportate(&t1, &t2, &n, &m, &z)); ^ camioane.c:10:5: note: expected 'int' but argument is of type 'int *' int tone_transportate(int t1, int t2, int n, int m, int z) ^ camioane.c:20:5: warning: passing argument 3 of 'tone_transportate' makes integer from pointer without a cast [enabled by default] printf("%d", tone_transportate(&t1, &t2, &n, &m, &z)); ^ camioane.c:10:5: note: expected 'int' but argument is of type 'int *' int tone_transportate(int t1, int t2, int n, int m, int z) ^ camioane.c:20:5: warning: passing argument 4 of 'tone_transportate' makes integer from pointer without a cast [enabled by default] printf("%d", tone_transportate(&t1, &t2, &n, &m, &z)); ^ camioane.c:10:5: note: expected 'int' but argument is of type 'int *' int tone_transportate(int t1, int t2, int n, int m, int z) ^ camioane.c:20:5: warning: passing argument 5 of 'tone_transportate' makes integer from pointer without a cast [enabled by default] printf("%d", tone_transportate(&t1, &t2, &n, &m, &z)); ^ camioane.c:10:5: note: expected 'int' but argument is of type 'int *' int tone_transportate(int t1, int t2, int n, int m, int z) ^ camioane.c: In function 'citire_date': camioane.c:6:10: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d %d %d %d", &t1, &t2, &n, &m, &z); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Camioane 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ă.