1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
PolarNik [594]
3 years ago
6

Write a C program that asks the user for an angle in degrees and a number of terms, and calculates the Taylor series expansion o

f the cosine of the angle using the number of terms specified. The program should print the result and it should also print the value of the cosine using the cos function from math.h
Computers and Technology
1 answer:
nordsb [41]3 years ago
7 0

Answer:

int main(){

   double degree;

   printf("Enter your angle value in degree:");

   scanf("%If",&degree);

   double radian = degree * (M_PI/180);

    printf("sin value is %IF\n",sin(radian));

      printf("cos value is %IF\n",cos(radian));

      printf("tan value is %IF\n",tan(radian));

         return 0;

Explanation:

to solve the problem, first you will need to import the math.h header function.

All of these methods take one double value as argument and returns the result as double.

The argument should be in radian, so is the user input is in degree, we need to convert it to radian by multipling the value PI/180. MI_PI is defined in math.h and it holds the value of PI.

After converting it to radian, we can calculate and print out sin, cos and tan values.

To make the conversion, just use sin(), cos(), and tan()

You might be interested in
Write a program for any element in keysList with a value greater than 50, print the corresponding value in itemsList, followed b
Mamont248 [21]

Answer:

The solution code is written in Python:

  1. keysList = [32, 105, 101, 35]
  2. itemsList = [10, 20, 30, 40]
  3. output = ""
  4. for i in range(len(keysList)):
  5.    if(keysList[i] > 50):
  6.        output += str(itemsList[i]) + " "
  7.    
  8. print(output)

Explanation:

Firstly, let us use the two sample list, keysList and itemsList in our program (Line 1-2). Then create a output variable to hold the output string (Line 4).

Next, we create a for-loop and use it to traverse through the elements in the keysList. If any keysList element is bigger than 50 then we use the same index i to get the corresponding item from itemsList and join that value to the output string (Line 7-8).

Lastly, we print the output (Line 10).

4 0
3 years ago
In what ways can information be slanted in a news report?
ratelena [41]

Answer:It all depends on who the reader is likely to be and the information they’ll want.

Explanation:

Newspaper 1: Company wins contract

Newspaper 2: Previous company loses contract (equally true)

Newspaper 3, say a student paper in the local town: Prospects for new jobs open up as company wins contract.

8 0
2 years ago
What defines a social search?​
Nimfa-mama [501]

Known or unknown information on any subject been searched in the website such as googe.com, bing.com, ask me.com, LinkedIn, Twitter etc.

<u>Explanation:</u>

End user will receive information (multiple links) on the same subject on internet browser.

End user has to read and understand the information and pick up the right information on their further studies.

All the website will have their or search engines to retrieve the information on social search. In other way it makes our knowledge easily to understandable version rather referring the books.

8 0
3 years ago
Need help with this please
Rasek [7]

Answer:

4. let eggs = 5

let bread = 10

let soda = 6

5.

let total = eggs+bread+soda

4 0
3 years ago
Why computer science is your favorite
daser333 [38]

The most important aspect of computer science is problem solving, an essential skill for life. Students study the design, development and analysis of software and hardware used to solve problems in a variety of business, scientific and social contexts.

5 0
3 years ago
Other questions:
  • When you close a file, what happens to the undo history list for that file?
    5·1 answer
  • Using ______, a smartphone can connect to an automobile audio/control system
    6·1 answer
  • Which description best explains a placeholder?
    7·1 answer
  • When using a function to preform a calculation how would you select the range of numbers to use
    13·1 answer
  • What is the purpose the wait block?
    10·1 answer
  • Select the correct answer.
    7·1 answer
  • Darla is going to start writing the HTML code for a web page. What would she start with?
    11·1 answer
  • Printed versions of your presentation that contain the slides and blank lines below are called
    9·1 answer
  • Business Rules constraints falls into two categories:
    7·1 answer
  • where should a user disable virus protection settings that might prevent the boot area of the hard drive from being altered? a.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!