Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PuntosTriangulo
//Title of this code #include <stdio.h> int main(void) { double x1, x2, x3; double y1, y2, y3; double m12, m13; printf("Coordenadas:\n"); printf("x1: "); scanf(" %lf", &x1); printf("y1: "); scanf(" %lf", &y1); printf("x2: "); scanf(" %lf", &x2); printf("y2: "); scanf(" %lf", &y2); printf("x3: "); scanf(" %lf", &x3); printf("y3: "); scanf(" %lf", &y3); if((x1 == x2 && y1 == y2) || (x1 == x3 && y1 == y3) || (x2 == x3 && y2 == y3)) { printf("PUNTOS REPETIDOS.\n\n"); } else if(x1 == x2 && x1 == x3) { printf("PUNTOS ALINEADOS VERTICALMENTE\n\n"); } else if(x1 == x2 || x1 == x3 || x2 == x3) { printf("TRIANGULO\n\n"); } else { m12 = (y2 - y1) / (x2 - x1); m13 = (y3 - y1) / (x3 - x1); if(m12 == m13 || m12 == -m13) { printf("PUNTOS ALINEADOS\n\n"); } else { printf("TRIANGULO\n\n"); } } return 0; }
run
|
edit
|
history
|
help
0
C_141106_Potencia
Nitheesh
A_141117_Primo02
3.1.2 Matrix add/sub file concept
numerodevecesquerepitedigitoennumero
2.1 Comparision of Matrix Transpose Execution Time
C_141127_Matriz01
AVANCE DE PREGUNTA 5
B_141125_Repetidos
fibonacci