• Forum
  • Lounge
  • related to trigonometirc values and loop

 
related to trigonometirc values and loops

Nov 25, 2019 at 4:41am

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.


Nov 25, 2019 at 5:34am
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/
Nov 25, 2019 at 7:13am
closed account (E8A4Nwbp)
[REDACTED]
Last edited on Nov 25, 2019 at 6:28pm
Nov 25, 2019 at 8:17am
Cross-posting does not constitute abuse, it's just lacking in etiquette.
Nov 25, 2019 at 9:51am
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.
Nov 26, 2019 at 8:08pm
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.