Write a C++ program with a nested loop structure that displays the sinusoidal curve
f(α)=35sin(α) in ‘*’ for f(α) ≥ 0 and in ‘o’ for f(α) < 0 as shown in Fig. 1. The curve
starts at α=0, and the sampling step-size of the curve is 0.1π. You program should plot
at least a full cycle (0 ≤ α ≤ 2π)
1
Expert's answer
2012-10-01T10:14:46-0400
#include <iostream> #include <math.h> #include <iomanip> using namespace std;
Comments
Leave a comment