I changed it to :
(still no good)
Code:
#include <stdio.h>
#include <math.h>
#include <windows.h>
double A,B,C,calculation;
int selection;
main()
{
printf("Calcute the side of a traingle...a^2 + b^2 = c^2\n");
printf("Which sides do you have?\n");
printf("(1) a , b\n(2) b , c\n(3) a , c\n");
scanf("%d", &selection);
if (selection==1)
{
printf("Please enter the two sides:\n");
printf("A: ");
scanf("%f", &A);
printf("B: ");
scanf("%f", &B);
calculation = A*A-B*B;
C = sqrt(calculation);
printf("C = %f", C);
}
if (selection==2)
{
printf("Please enter the two sides:\n");
printf("B: ");
scanf("%f", &B);
printf("C: ");
scanf("%f", &C);
calculation = B*B-C*C;
A = sqrt(calculation);
printf("A = %f", A);
}
if (selection==3)
{
printf("Please enter the two sides:\n");
printf("A: ");
scanf("%f", &A);
printf("C: ");
scanf("%f", &C);
calculation = C*C-A*A;
B = sqrt(calculation);
printf("B = %f", B);
}
Sleep (50000);
return 0;
}