Hi, I need help writing a program that finds cosine valuesfrom 0 to 360 degrees
ID: 3611238 • Letter: H
Question
Hi, I need help writing a program that finds cosine valuesfrom 0 to 360 degrees in increments of 10 and prnts out the anwersin a list in C++ and in a data file aswell. Please HELP!! Ex: x cosx 0 0 . . . . 360 0 Hi, I need help writing a program that finds cosine valuesfrom 0 to 360 degrees in increments of 10 and prnts out the anwersin a list in C++ and in a data file aswell. Please HELP!! Ex: x cosx 0 0 . . . . 360 0Explanation / Answer
//Hopethis will help you.
#include<iostream>
#include<math.h>
#define pi (22.0/7)
using namespace std;
int main()
{ int i;
for(i=0;i<=360;i+=10)
{
cout<<i<<""<<cos(i*pi/180)<<endl;
}
system("pause");
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.