#923
Să se determine maximul a două fracţii date.
| Problema | FractiiMax | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64412651 | Utilizator | |
| Fișier | fractiimax.cpp | Dimensiune | 819 B |
| Data încărcării | 05 Mai 2026, 18:22 | Scor/rezultat | Eroare de compilare |
fractiimax.cpp: In function ‘void citire(int&, int&, fractie*)’: fractiimax.cpp:12:12: error: request for member ‘a’ in ‘x’, which is of pointer type ‘fractie*’ (maybe you meant to use ‘->’ ?) 12 | cin>>x.a>>x.b>>x.c>>x.d; | ^ fractiimax.cpp:12:17: error: request for member ‘b’ in ‘x’, which is of pointer type ‘fractie*’ (maybe you meant to use ‘->’ ?) 12 | cin>>x.a>>x.b>>x.c>>x.d; | ^ fractiimax.cpp:12:22: error: request for member ‘c’ in ‘x’, which is of pointer type ‘fractie*’ (maybe you meant to use ‘->’ ?) 12 | cin>>x.a>>x.b>>x.c>>x.d; | ^ fractiimax.cpp:12:27: error: request for member ‘d’ in ‘x’, which is of pointer type ‘fractie*’ (maybe you meant to use ‘->’ ?) 12 | cin>>x.a>>x.b>>x.c>>x.d; | ^ fractiimax.cpp: In function ‘void fractii(int, int)’: fractiimax.cpp:18:10: error: ‘a’ was not declared in this scope 18 | f1 = a/b; | ^ fractiimax.cpp:18:12: error: ‘b’ was not declared in this scope 18 | f1 = a/b; | ^ fractiimax.cpp:19:10: error: ‘c’ was not declared in this scope 19 | f2 = c/d; | ^ fractiimax.cpp:19:12: error: ‘d’ was not declared in this scope 19 | f2 = c/d; | ^ fractiimax.cpp: In function ‘void ireductibila(int, int, fractie*)’: fractiimax.cpp:32:15: error: ‘a’ was not declared in this scope 32 | int aux = a*b; | ^ fractiimax.cpp:32:17: error: ‘b’ was not declared in this scope 32 | int aux = a*b; | ^ fractiimax.cpp: In function ‘void afisare(int, int, fractie*)’: fractiimax.cpp:44:9: error: ‘aux’ was not declared in this scope 44 | m = aux; | ^~~ fractiimax.cpp:45:9: error: ‘a’ was not declared in this scope 45 | n = a; | ^ fractiimax.cpp: In function ‘int main()’: fractiimax.cpp:52:12: error: ‘n’ was not declared in this scope 52 | citire(n,m,x); | ^ fractiimax.cpp:52:14: error: ‘m’ was not declared in this scope 52 | citire(n,m,x); | ^ fractiimax.cpp:54:18: error: ‘f1’ was not declared in this scope 54 | ireductibila(f1,f2); | ^~ fractiimax.cpp:54:21: error: ‘f2’ was not declared in this scope 54 | ireductibila(f1,f2); | ^~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FractiiMax 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ă.