Hello fellow programmers, I am having a problem with a program I need to write for school. I have it written as follows:
#include <iostream>
#include<cmath>
#define PI 3.141592;
using namespace std;
int main()
{
double a;
double b;
double c;
double n;
double m;
double p;
double q;
cout<<"enter value of a\n";
cin>>a;
cout<<"enter value of b\n";
cin>>b;
c = sqrt ((a*a) + (b*b));
n = acos (a) * 180/PI;
m = acos (b) * 180/PI;
p = acos (a) * PI/180; //This is where an error occurs.
q = acos (b) * PI/180; // This is where second error occurs.
Then it gives values. The problem is that when I try to compile it, it says
there is a syntax error on the indicated lines above before the ; token.
Im new at this and the answer is probably really simple, so I'm appologizing
in advance for taking away your precious time when you could be
creating new levels for CS. Any help would be greatly appreciated. Thanx
#include <iostream>
#include<cmath>
#define PI 3.141592;
using namespace std;
int main()
{
double a;
double b;
double c;
double n;
double m;
double p;
double q;
cout<<"enter value of a\n";
cin>>a;
cout<<"enter value of b\n";
cin>>b;
c = sqrt ((a*a) + (b*b));
n = acos (a) * 180/PI;
m = acos (b) * 180/PI;
p = acos (a) * PI/180; //This is where an error occurs.
q = acos (b) * PI/180; // This is where second error occurs.
Then it gives values. The problem is that when I try to compile it, it says
there is a syntax error on the indicated lines above before the ; token.
Im new at this and the answer is probably really simple, so I'm appologizing
in advance for taking away your precious time when you could be
creating new levels for CS. Any help would be greatly appreciated. Thanx
Comment