#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>
int main()
{
float a, b, rad; //a,b为其中两边rad为角度制
scanf("%f %f %f", &a, &b, &rad);
float c; //待求解的第三边
c = pow((pow(a, 2) + pow(b, 2) - 2*a*b * cos(rad/180*3.14159265358979)), 0.5);
printf("c = % f", c);
return 0;
}
vs编写的,不用vs的可以去掉#define ......