Compile Error
Posted: Sat Oct 19, 2002 2:16 pm
During last contest this code get compile error:
-- cut --
Here are the compiler error messages:
g++: 00002138_PC.c: No such file or directory
g++: No input files
-- end --
--
Please say why?
Code:
[cpp]
#include <fstream.h>
#include <math.h>
#include <assert.h>
#define ER 0.000001
const long double PI=2*acos(0);
int main()
{
long double a, b, n, m, s, alpha, c;
cout.setf(ios::fixed|ios::showpoint);
cout.precision(2);
while((cin>>a>>b>>s>>n>>m)&&(a+b+s+n+m)>=ER)
{
c=hypot(a*n, b*m);
assert(c>ER);
alpha=180*acos(a*n/c)/PI;
c/=s;
cout<<alpha<<' '<<c<<endl;
}
return 0;
}
[/cpp]
-- cut --
Here are the compiler error messages:
g++: 00002138_PC.c: No such file or directory
g++: No input files
-- end --
--
Please say why?
Code:
[cpp]
#include <fstream.h>
#include <math.h>
#include <assert.h>
#define ER 0.000001
const long double PI=2*acos(0);
int main()
{
long double a, b, n, m, s, alpha, c;
cout.setf(ios::fixed|ios::showpoint);
cout.precision(2);
while((cin>>a>>b>>s>>n>>m)&&(a+b+s+n+m)>=ER)
{
c=hypot(a*n, b*m);
assert(c>ER);
alpha=180*acos(a*n/c)/PI;
c/=s;
cout<<alpha<<' '<<c<<endl;
}
return 0;
}
[/cpp]