Example #1
0
int main() {
int a;
int b;
int c;
int valid;
int type;
int num;

	num = sanitizedInput();
	a = num;
	num = sanitizedInput();
	b = num;
	num = sanitizedInput();
	c = num;
	valid = isTriangle(a, b, c);
	type = triangleType(a, b, c);
	if (valid == 0) {
		printf("Your triangle is not valid!\n");}
	if (valid == 1) {
		printf("Your triangle is valid!\n");}
	if (type == 1) {
		printf("Your triangle is equilateral!\n");}
	if (type == 2) {
		printf("Your triangle is isoceles!\n");}
	if (type == 3) {
		printf("Your triangle is scalene!\n");}
return 0;
}
Example #2
0
int main() {
	int triangulartype;
	int extra;
	int sidespicyboys;
	int sidekazookid;
	int sidepepe;
	int invalid;
	sidespicyboys = sanitizedInput();
	sidekazookid = sanitizedInput();
	sidepepe = sanitizedInput();
	extra = isTriangle(sidespicyboys, sidekazookid, sidepepe);	
	triangulartype = triangleType(sidespicyboys, sidekazookid, sidepepe);		
	return 0;
}