Search found 2 matches

by Max
Sun Nov 18, 2001 12:32 am
Forum: Volume 101 (10100-10199)
Topic: 10195 - The Knights Of The Round Table
Replies: 59
Views: 22767

Thanks
by Max
Sat Nov 17, 2001 4:45 pm
Forum: Volume 101 (10100-10199)
Topic: 10195 - The Knights Of The Round Table
Replies: 59
Views: 22767

10195 - The Knights Of The Round Table

Why does this code get W.A.?

#include <math.h>
#include <iostream.h>
#include <iomanip.h>

long double a, b, c, p;

main(){
cout << setiosflags(ios::fixed) << setprecision(3);
while (cin >> a >> b >> c){
p = (a+b+c)/2;
cout << "The radius of the round table is: "
<< sqrt( (p-a)*(p-b)*(p-c)/p ...

Go to advanced search