My code in C++ is:
#include <stdio.h>
#include <math.h>
int main()
{ double a,b,c;
double S;
double p;
while(scanf("%lf %lf %lf", &a, &b, &c)==3)
{
if(a!=0 && b!=0 && c!=0)
{
p = (a+b+c)/2;
S=sqrt((p-a)*(p-b)*(p-c)/p);
printf("The radius of the round table is: %.3lf\n",S);
}
else ...
Search found 2 matches
- Wed Dec 10, 2003 8:36 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10195 - The Knights Of The Round Table
- Replies: 59
- Views: 22727
- Wed Dec 10, 2003 8:35 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10195 - The Knights Of The Round Table
- Replies: 59
- Views: 22727
10195 WA why ????
My code in C++ is:
#include <stdio.h>
#include <math.h>
int main()
{ double a,b,c;
double S;
double p;
while(scanf("%lf %lf %lf", &a, &b, &c)==3)
{
if(a!=0 && b!=0 && c!=0)
{
p = (a+b+c)/2;
S=sqrt((p-a)*(p-b)*(p-c)/p);
printf("The radius of the round table is: %.3lf\n",S);
}
else ...
#include <stdio.h>
#include <math.h>
int main()
{ double a,b,c;
double S;
double p;
while(scanf("%lf %lf %lf", &a, &b, &c)==3)
{
if(a!=0 && b!=0 && c!=0)
{
p = (a+b+c)/2;
S=sqrt((p-a)*(p-b)*(p-c)/p);
printf("The radius of the round table is: %.3lf\n",S);
}
else ...