#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 | #51577423 | Utilizator | |
Fișier | punctsegment.c | Dimensiune | 655 B |
Data încărcării | 15 Iulie 2024, 12:14 | 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:19:9: warning: statement with no effect [-Wunused-value] if(int)a+(int)b-(int)c==0) ^ punctsegment.c:19:27: error: expected ';' before ')' token if(int)a+(int)b-(int)c==0) ^ punctsegment.c:19:27: error: expected statement before ')' token punctsegment.c:21:1: error: expected '}' before 'else' else ^ punctsegment.c: At top level: punctsegment.c:25:1: warning: data definition has no type or storage class [enabled by default] fclose(f); ^ punctsegment.c:25:1: warning: type defaults to 'int' in declaration of 'fclose' [enabled by default] punctsegment.c:25:1: warning: parameter names (without types) in function declaration [enabled by default] punctsegment.c:26:5: warning: data definition has no type or storage class [enabled by default] fclose(g); ^ punctsegment.c:26:5: warning: type defaults to 'int' in declaration of 'fclose' [enabled by default] punctsegment.c:26:5: warning: parameter names (without types) in function declaration [enabled by default] punctsegment.c:27:1: error: expected identifier or '(' before 'return' return 0; ^ punctsegment.c:29:1: error: expected identifier or '(' before '}' token } ^ punctsegment.c: In function 'main': 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ă.