#453
distincte1
Se citesc de la tastatură trei numere naturale. Să se determine numărul de valori distincte.
Problema | distincte1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54521538 | Utilizator | |
Fișier | distincte1.c | Dimensiune | 1.04 KB |
Data încărcării | 01 Decembrie 2024, 13:45 | Scor / rezultat | Eroare de compilare |
distincte1.c: In function 'main': distincte1.c:9:16: error: lvalue required as left operand of assignment if (a=b, &b=c, &a=c){ ^ distincte1.c:9:22: error: lvalue required as left operand of assignment if (a=b, &b=c, &a=c){ ^ distincte1.c:9:18: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (a=b, &b=c, &a=c){ ^ distincte1.c:13:16: warning: comparison between pointer and integer [enabled by default] if (a=b, &b<c, &a<c) { ^ distincte1.c:13:22: warning: comparison between pointer and integer [enabled by default] if (a=b, &b<c, &a<c) { ^ distincte1.c:13:16: warning: value computed is not used [-Wunused-value] if (a=b, &b<c, &a<c) { ^ distincte1.c:17:14: error: expected identifier before '&' token if (c<a. &c<b, &a=b) { ^ distincte1.c:20:16: error: lvalue required as left operand of assignment if (b<a, &a=c, &b<c) { ^ distincte1.c:20:12: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (b<a, &a=c, &b<c) { ^ distincte1.c:20:22: warning: comparison between pointer and integer [enabled by default] if (b<a, &a=c, &b<c) { ^ distincte1.c:20:18: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (b<a, &a=c, &b<c) { ^ distincte1.c:23:16: warning: comparison between pointer and integer [enabled by default] if (a=c, &c<b, &a<b) { ^ distincte1.c:23:22: warning: comparison between pointer and integer [enabled by default] if (a=c, &c<b, &a<b) { ^ distincte1.c:23:16: warning: value computed is not used [-Wunused-value] if (a=c, &c<b, &a<b) { ^ distincte1.c:26:16: warning: comparison between pointer and integer [enabled by default] if (c=b, &b<a, &b<c) { ^ distincte1.c:26:22: warning: comparison between pointer and integer [enabled by default] if (c=b, &b<a, &b<c) { ^ distincte1.c:26:16: warning: value computed is not used [-Wunused-value] if (c=b, &b<a, &b<c) { ^ distincte1.c:29:16: error: lvalue required as left operand of assignment if (a<c, &a=b, &b<c) { ^ distincte1.c:29:12: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (a<c, &a=b, &b<c) { ^ distincte1.c:29:22: warning: comparison between pointer and integer [enabled by default] if (a<c, &a=b, &b<c) { ^ distincte1.c:29:18: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (a<c, &a=b, &b<c) { ^ distincte1.c:32:16: warning: comparison between pointer and integer [enabled by default] if (a<b, &b<c, &a<c) { ^ distincte1.c:32:12: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (a<b, &b<c, &a<c) { ^ distincte1.c:32:22: warning: comparison between pointer and integer [enabled by default] if (a<b, &b<c, &a<c) { ^ distincte1.c:32:18: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (a<b, &b<c, &a<c) { ^ distincte1.c:35:12: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (a<c, c<b, a<b) { ^ distincte1.c:35:17: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (a<c, c<b, a<b) { ^ distincte1.c:38:12: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (b<c, c<a, b<a) { ^ distincte1.c:38:17: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (b<c, c<a, b<a) { ^ distincte1.c:41:12: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (b<a, a<c, b<c) { ^ distincte1.c:41:17: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (b<a, a<c, b<c) { ^ distincte1.c:44:12: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (c<a, a<b, c<b) { ^ distincte1.c:44:17: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (c<a, a<b, c<b) { ^ distincte1.c:47:12: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (c<b, b<a, c<a) { ^ distincte1.c:47:17: warning: left-hand operand of comma expression has no effect [-Wunused-value] if (c<b, b<a, c<a) { ^ distincte1.c:7:11: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf ("%d%d%d", &a, &b, &c); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema distincte1 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ă.