Sin with Drawline c++ HW Call the file: sinDrawline.cpp Create 2 functions: 1) Degrees2Radians: which has input Degrees, and returns Radians 2) Drawline: which takes two parameters: a character and...


Sin with Drawline c++ HW<br>Call the file: sinDrawline.cpp<br>Create 2 functions:<br>1) Degrees2Radians: which has input Degrees, and returns Radians<br>2) Drawline: which takes two parameters: a character and numRepetitions and prints the<br>character numRepetitions times, followed by a newline<br>Inside main()<br>For values between 0 and 360, in 5 degree increments:<br>calculate and print the value of sin (degrees),<br>After every 90 degrees, print out a line of 30 dashes (minus signs '-')<br>Extra information required:<br>#include <cmath> // for sin function<br>In order to have the precise format we want:<br>Put this at the top of main:<br>cout.setf(ios::fixed);<br>cout.setf(ios::showpoint); // show decimals even if not needed<br>cout.precision(5); // show 5 digits to right of decimal<br>

Extracted text: Sin with Drawline c++ HW Call the file: sinDrawline.cpp Create 2 functions: 1) Degrees2Radians: which has input Degrees, and returns Radians 2) Drawline: which takes two parameters: a character and numRepetitions and prints the character numRepetitions times, followed by a newline Inside main() For values between 0 and 360, in 5 degree increments: calculate and print the value of sin (degrees), After every 90 degrees, print out a line of 30 dashes (minus signs '-') Extra information required: #include // for sin function In order to have the precise format we want: Put this at the top of main: cout.setf(ios::fixed); cout.setf(ios::showpoint); // show decimals even if not needed cout.precision(5); // show 5 digits to right of decimal

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here