H
happytoday
Though I included math.h I got that error :
Undefined first referenced
symbol in file
sin sine.o
atan sine.o
ld: fatal: Symbol referencing errors. No output written to a.out
The program :
*----------------
#include "stdio.h"
#include "math.h"
void main()
{
int angle_degree;
double angle_raduis,pi,result;
// sin=pi*(angle_degree) / 100.0 ;
// pi=4.0 * atan (1.0);
pi=4.0 * atan (1.0);
printf (" angle \t sin \n");
printf (" ----- \t --- \n");
while (angle_degree <= 360 )
{
result=sin(pi*angle_degree)/180.0;
printf (" %3d \t %f \n",angle_degree , result);
angle_degree=angle_degree+10;
}
}
Undefined first referenced
symbol in file
sin sine.o
atan sine.o
ld: fatal: Symbol referencing errors. No output written to a.out
The program :
*----------------
#include "stdio.h"
#include "math.h"
void main()
{
int angle_degree;
double angle_raduis,pi,result;
// sin=pi*(angle_degree) / 100.0 ;
// pi=4.0 * atan (1.0);
pi=4.0 * atan (1.0);
printf (" angle \t sin \n");
printf (" ----- \t --- \n");
while (angle_degree <= 360 )
{
result=sin(pi*angle_degree)/180.0;
printf (" %3d \t %f \n",angle_degree , result);
angle_degree=angle_degree+10;
}
}