2

/输入部分/

printf("Enter the value for a: ");
scanf("%d", &a);

printf("Enter the value for b: ");
scanf("%d", &b);

printf("Enter the value for theta: ");
scanf("%d", &theta);

/计算部分/

rad = (theta * ( PI/180 ));
c = sqrt( pow(a,2) + pow(b,2) - (2 * a * b * cos(rad)));
per = (a + b + c);
area = (a * b * sin(rad)/2);

/输出部分/

printf("The perimeter equals: %f\n", per);
printf("The area equals: %f\n", area);

如何修复此错误消息?

4

0 回答 0