0

Hi, I have written the below code and to finish my assignment I need to have this file save to "results.txt" and I also need the angles to come out as degrees in the output..I've tried several tutorials and I am really struggling with this..any help would be appreciated

```
using namespace std;
#include<iostream>
#include<cmath>
#include<iomanip>
#include<fstream>
#include <iostream.h>
#include <fstream.h>
#include <iomanip.h>
int main()
{
double angle1, side1, angle2, side2, angle3, side3, PI= 4.0*atan(1.0), perimiter, area;
cout<<"Enter value of angle 1 and side opposite of angle"<<endl;
cin>>angle1>>side1;
if (angle1>90)
{
cout<<"error: angle cannot be greater than 90"<<endl;
}
if (angle1<=90)
{
side3=(side1)/(sin(angle1));
side2=(side1)/(tan(angle1));
cout<<"Side 2="<<side2<<endl;
cout<<"Side 3="<<side3<<endl;
angle2=(PI/2)-(angle1);
angle3=(PI/2);
cout<<"Angle 2="<<angle2<<endl;
cout<<"Angle 3="<<angle3<<endl;
perimiter=(side1)+(side2)+(side3);
cout<<"Perimiter="<<perimiter<<endl;
area=((side1*side2)/2);
cout<<"Area="<<area<<endl;
}
if (area>100)
{
cout<<"this is a large triangle"<<endl;
}
system("pause");
return 0;
}
```