Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
20171030_TRIANGULO
#include <stdio.h> #include <stdlib.h> int main() { double x1, x2, x3, y1, y2, y3; double m12, m13; printf("Valor de x1: "); scanf(" %lf", &x1); printf("Valor de y1: "); scanf(" %lf", &y1); printf("Valor de x2: "); scanf(" %lf", &x2); printf("Valor de y2: "); scanf(" %lf", &y2); printf("Valor de x3: "); scanf(" %lf", &x3); printf("Valor de y3: "); scanf(" %lf", &y3); if((x1 == x2 && y1 == y2) || (x1 == x3 && y1 == y3) || (x2 == x3 && y2 == y3)) { printf("PUNTOS REPETIDOS...\n"); } else if(x1 == x2 && x1 == x3) { printf("Puntos en linea. VERTICALES\n"); } else if(x1 == x2 || x1 == x3 || x2 == x3) { printf("Puntos forman TRIANGULO\n"); } else { m12 = (y2 - y1) / (x2 - x1); m13 = (y3 - y1) / (x3 - x1); if(m12 == m13) { printf("Puntos en linea.\n"); } else { printf("Puntos forman TRIANGULO\n"); } } return 0; }
run
|
edit
|
history
|
help
0
Fhk
Example of scanf and basic integer manipulation - with function call
Static scope
Assignment 8 pt 2
Volume of sphere
141124_PI
Newtons method
Matrices de cadenas con *punteros
bit shift and mask
Project 3 Part 1 v1.7