#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 | #62107177 | Utilizator | |
| Fișier | fractiimax.cpp | Dimensiune | 376 B |
| Data încărcării | 09 Ianuarie 2026, 08:39 | Scor/rezultat | Eroare de compilare |
fractiimax.cpp: In function 'int main()': fractiimax.cpp:13:9: error: cannot convert 'main()::fractii' to 'int' in assignment fmax=f1; ^ fractiimax.cpp:14:12: error: cannot convert 'main()::fractii' to 'int' in assignment else fmax=f2; ^ fractiimax.cpp:16:10: error: request for member 'x' in 'f', which is of non-class type 'int' while(f.x!=0) ^ fractiimax.cpp:18:14: error: request for member 'y' in 'f', which is of non-class type 'int' int r=f.y%f.x; ^ fractiimax.cpp:18:18: error: request for member 'x' in 'f', which is of non-class type 'int' int r=f.y%f.x; ^ fractiimax.cpp:19:8: error: request for member 'y' in 'f', which is of non-class type 'int' f.y=f.x; ^ fractiimax.cpp:19:12: error: request for member 'x' in 'f', which is of non-class type 'int' f.y=f.x; ^ fractiimax.cpp:20:8: error: request for member 'x' in 'f', which is of non-class type 'int' f.x=r; ^ fractiimax.cpp:22:7: error: request for member 'x' in 'fmax', which is of non-class type 'int' fmax.x/=f.x; ^ fractiimax.cpp:22:12: error: request for member 'x' in 'f', which is of non-class type 'int' fmax.x/=f.x; ^ fractiimax.cpp:23:7: error: request for member 'y' in 'fmax', which is of non-class type 'int' fmax.y/=f.y; ^ fractiimax.cpp:23:12: error: request for member 'y' in 'f', which is of non-class type 'int' fmax.y/=f.y; ^ fractiimax.cpp:24:13: error: request for member 'x' in 'fmax', which is of non-class type 'int' cout<<fmax.x<<" "<<fmax.y; ^ fractiimax.cpp:24:26: error: request for member 'y' in 'fmax', which is of non-class type 'int' cout<<fmax.x<<" "<<fmax.y; ^ fractiimax.cpp:10:7: warning: unused variable 'r' [-Wunused-variable] int r,fmax,f; ^
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ă.