Python code:

while True: Side1 = input("Please enter side 1\n") Side2 = input("Please enter side 2 \n") Side3 = input("Please enter side 3 \n") if Side1==Side2 and Side2==Side3: print("The Triangle is Equilateral"); elif Side1*Side1+Side2*Side2==Side3*Side3 or Side3*Side3+Side2*Side2==Side1*Side1 or Side1*Side1+Side3*Side3==Side2*Side2: print("It is a right triangle") else: printf("It is neither a right triangle or an equilateral triangle") y = input("\nWould you like to try again? 1 for yes, 2 for no.\n") if y==1: break

c code:

#include <stdio.h> void inputFunction(float *, float *, float *); void outputFunction(float, float, float); int main() { float Side1,Side2,Side3; int y=1; while (y==1) { inputFunction(&Side1,&Side2,&Side3); outputFunction(Side1,Side2,Side3); printf("\nWould you like to try again? 1 for yes, 2 for no.\n"); scanf("%d", &y); } } void inputFunction(float*Side1, float*Side2, float*Side3) { printf("Please enter side 1\n"); scanf("%f", Side1); printf("Please enter side 2 \n"); scanf("%f", Side2); printf("Please enter side 3 \n"); scanf("%f", Side3); } void outputFunction(float Side1, float Side2, float Side3) { if (Side1==Side2 && Side2==Side3) { printf("The Triangle is Equilateral"); } else if ((Side1*Side1)+(Side2*Side2)==(Side3*Side3) || (Side3*Side3)+(Side2*Side2)==(Side1*Side1) || (Side1*Side1)+(Side3*Side3)==(Side2*Side2)) { printf("It is a right triangle"); } else { printf("It is neither a right triangle or an equilateral triangle"); } }