Write a C++ program to print out the value of sin(x) or cos(x) depending on a user input (1 = sin, 2 = cos)and continue the expansion until successive terms differ from each other by less than 0.0001 (in terms of absolute value). Report how many terms are necessary.

Sorry, but we don't do your homework for you. Please write the code, and post it here. Then we may be inclined to help sort out your problems.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.