• Forum
  • Lounge
  • related to trigonometirc values and loop

 
related to trigonometirc values and loops


hello, I'm very new to C++ programming and I'd really appreciate any help regarding this question.Thanks.

Write a program that prints a table showing the sin, cos, and tan values for the uncommon angles (15, 20, 70, and140). Make sure that the values are displayed only up to 4significant digits.


Oooh, a codechef wanna-be question, and a duplicate post. In the Lounge.

A two-fer, fer shure!

http://www.cplusplus.com/forum/lounge/265642/
closed account (E8A4Nwbp)
[REDACTED]
Last edited on
Cross-posting does not constitute abuse, it's just lacking in etiquette.
Yeah deleting the post is quite extreme. Please don't abuse that.
Also it doesn't look like code chef tbh. Could be wrong. Regardless, it's not a high quality post.

Ananas, please post move this post to the beginners section. Try editing your post and changing the section.
its probably spam but what the hey...
put them in beginners after this one. Its already here, though..
<cmath> has c++'s trig in it.
c++ trig (and all programming languages I know of) is in radians. you need to convert the values to rad to get the answers.
then its just formatted cout statements to print your results.
const double torad = ‭0.01745329251994329576923690768489‬;
cout << sin( torad* 15.0) << "|" << cos(torad*15.0); //keep going for all the values.
Topic archived. No new replies allowed.