Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Spring 2017 Lab 5 v1
//gcc 5.4.0 #include <stdio.h> int main(void) { int a; int b; int c; int x; scanf("%d %d %d",&a,&b,&c); // printf("%d\n%d\n%d\n",a,b,c); if(a==b&&b==c) x=0; if((a==b&&b!=c)||(b==c&&a!=b)||(a==c&&b!=c)) x=1; if(a!=b&&b!=c&&c!=a) x=2; if((a==0)||(b==0)||(c==0)) x=3; if((a<0)||(b<0)||(c<0)) x=3; if((c>=a+b)||(a>=c+b)||(b>=a+c)) x=4; // if((isspace(a)||(isspace(b)||isspace(c)) // printf("%d\n",x); switch(x){ case 0: printf("The triangle is equilateral"); break; case 1: printf("The Triangle is isoceles"); break; case 2: printf("The Triangle is scalene"); break; case 3: printf("Those values aren't correct"); break; case 4: printf("That shape isn't a triangle"); break; } }
run
|
edit
|
history
|
help
0
150115_MatrizTodosDistintos
Avance 2 de pregunta 5
Practice Problem 7
shrinken shraken shrank leave as no cold call acces program unles clownbtweak blue voda
Text to ASCII (top)
decr
left significant peace as unison real manual user
Even odd program
Fhk
18BCE2182 ASSESS_1 Q1-9