#929
PunctSegment
Se dau un punct și un segment în plan. Să se verifice dacă punctul se găsește pe segment.
Problema | PunctSegment | Operații I/O |
![]() punctsegment.in /punctsegment.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51577415 | Utilizator | |
Fișier | punctsegment.c | Dimensiune | 656 B |
Data încărcării | 15 Iulie 2024, 12:13 | Scor / rezultat | Eroare de compilare |
punctsegment.c: In function 'main': punctsegment.c:14:1: warning: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration] double a=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); ^ punctsegment.c:14:10: warning: incompatible implicit declaration of built-in function 'sqrt' [enabled by default] double a=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); ^ punctsegment.c:19:5: error: expected expression before 'int' if(int(a)+int(b)-int(c)==0) ^ punctsegment.c:15:12: warning: unused variable 'b' [-Wunused-variable] double b=sqrt((x3-x1)*(x3-x1)+(y3-y1)*(y3-y1)); ^ punctsegment.c:14:8: warning: unused variable 'a' [-Wunused-variable] double a=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); ^ punctsegment.c:7:7: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%lf %lf",&x1,&y1); ^ punctsegment.c:8:7: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%lf %lf",&x2,&y2); ^ punctsegment.c:9:7: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result] fscanf(f,"%lf %lf",&x3,&y3); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PunctSegment 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ă.