/*Program for determining wheather a given triangle is a right angled triangle or not*/ main() { float a,b,c; int x; clrscr(); x=111; while(x!=0) { clrscr(); printf("\n\tThis program will help you to determine wheather a given triangle is\n\ta right angled triangle or not.\n\n\t\t\tType 1 to continue and 0 to exit : "); scanf("%d",&x); switch(x) { case 1: printf("\n\tPlease note that all measures fed should be in the same unit\n\tof measurement, regardless of what unit you use to measure\n\tthe dimensions required."); printf("\n\n\tEnter the measure of the first side of the triangle : "); scanf("%f",&a); printf("\n\tEnter the measure of the second side of the triangle : "); scanf("%f",&b); printf("\n\tEnter the measure of the third side of the triangle : "); scanf("%d",&c); if(((a*a)==(b*b)+(c*c))||((b*b)==(a*a)+(c*c))||((c*c)==(b*b)+(a*a))) printf("\n\n\t RESULT : The given triangle is a right angled triangle."); else printf("\n\n\t RESULT : The given triangle is NOT a right angled triange."); printf("\n\n\n\tPress any key to continue........"); getch(); break; case 0: printf("\n\n\tThe program is terminated on your request.\n\tPress any key to return to the object file........"); getch(); break; default:printf("\n\n\t\t\tINVALID INPUT\n\n\t\t\tPress any key to continue........"); getch(); break; } } }