The following program is suppose to use the sin() function in the math library and write out an input's absolute value over an

4 answers
Question:

The following program is suppose to use the sin() function in the math library and write out an input's absolute value over an interval. So for example if sine(0.6) is 0.564 then its absolute value is the same (0.564). But if sine(2.4) is -0.675 then its absolute value is 0.675. #include #include /* has sin(), abs(), and fabs() */ int main(void) { double interval; int i; for(i = 0; i <30; i++) { interval = i/10.0; printf("sin( %lf ) = %lf \t", interval, abs(sin(interval))); } printf("\n\n"); return 0; }

Answers

#include <stdio.h>

#include <math.h> /* has sin(), abs(), and fabs() */

int main(void) {

   double interval;

   int i;

   for(i = 0; i <30; i++) {

       interval = i/10.0;

       printf("sin( %.1lf ) = %.3lf \t", interval, abs(sin(interval)));

   }

   printf("\n\n");

   return 0;

}

Explanation:

The C source code defines a void main program that outputs the absolute value of the sine() function of numbers 0.1 to 3.0.

from math import sin

n = # Any no. Negative or positive..

sine=abs(sin(n))

print(sine)

HOPE YOU UNDERSTAND IT!

answer; i believe its compare (b3: b4) ;

sory but complete the question

Similar Solved Works

2 answers

Why plastic do not rust​

Why plastic do not rust​...
4 answers

Discuss the main events of the Vedic Age and the challenges faced by the people then.

Discuss the main events of the Vedic Age and the challenges faced by the people then....
4 answers

10 Mins till due! :( urgent & will mark :(Jesse and Amir were assigned the same book to read. Jesse started reading on Saturday, andhe is reading

10 Mins till due! :( urgent & will mark :( Jesse and Amir were assigned the same book to read. Jesse started reading on Saturday, and he is reading 30 pages a day. Amir didn't start until Sunday, but he is reading 35 pages a day. 1. Write an equation to represent the number of pages Amir has re...
3 answers

How to not addUse methods to: 1. Get a String from the user at the command line 2. Populate an ArrayList of Character data (the wrapper

how to not addUse methods to: 1. Get a String from the user at the command line 2. Populate an ArrayList of Character data (the wrapper class), with each char in the String represented as a separate Character element in the ArrayList 3. Output each Character to the command line, each on a separate l...
10 answers

A flagpole has a height of 27 yards. It will be supported by three cables, each of which is attached to the flagpole at a point

A flagpole has a height of 27 yards. It will be supported by three cables, each of which is attached to the flagpole at a point 3 yards below the top of the pole and attached to the ground at a point that is 10 yards from the base of a flagpole find the total number that is required. Round the numbe...
3 answers

Determine whether the ordered pair (4,1) is a solution to the system of linear equations.3x-4y=83

Determine whether the ordered pair (4,1) is a solution to the system of linear equations. 3x-4y=83 x − 4 y = 8 -2x+5y=3− 2 x + 5 y = 3 Group of answer choices No Yes...
3 answers

About 600 bc, rome was conquered by a group from asia minor known as the

About 600 bc, rome was conquered by a group from asia minor known as the...
4 answers

Write an equivalent expression for 5x + 2y + 3x

Write an equivalent expression for 5x + 2y + 3x...
4 answers

What is the purpose of sfac 4 as stated in that concepts statement? a. to provide the methods for preparing

What is the purpose of sfac 4 as stated in that concepts statement? a. to provide the methods for preparing financial statements for nonbusiness entitiesb. to provide a basis for establishing detailed accounting and reporting standards for nonbusiness entitiesc. to provide detailed accounting and re...
4 answers

Which TWO articles of the U. S. Constitution talk about the president's job?

Which TWO articles of the U. S. Constitution talk about the president's job?...
4 answers

Correct the mistakes. there is a mistake in each sentence. find it and correct it. exemple: where you live? - where do you live?

Correct the mistakes. there is a mistake in each sentence. find it and correct it. exemple: where you live? - where do you live? 1.it is very hot today-do you like something to drink? 2.peter is got a lot of books because he"d like reading. 3.how many children do you got? 4.how many money has h...
4 answers

'meat isnt normally eaten in our house.' or 'meat isnt eaten normally in our house.' which is the correct

"meat isnt normally eaten in our house." or "meat isnt eaten normally in our house." which is the correct one?...
3 answers

Why using a temperature probe is preferable to using a conventional mercury thermometers

Why using a temperature probe is preferable to using a conventional mercury thermometers...
4 answers

Adense cloud of material suspended above the surface of the sun by loops of magnetic field. a. true b. false

Adense cloud of material suspended above the surface of the sun by loops of magnetic field. a. true b. false...
10 answers

What is a typical theme in gothic writing?

What is a typical theme in gothic writing?...
3 answers

Explain how the population of indigenous people declined dramatically. What effect did this have on African slavery?

Explain how the population of indigenous people declined dramatically. What effect did this have on African slavery? [tex]Explain how the population of indigenous people declined dramatically. What effect did this have on[/tex]...
4 answers

The profit P (in thousands of dollars) for a company spending an amount s (in thousands of dollars)

The profit P (in thousands of dollars) for a company spending an amount s (in thousands of dollars) on advertising is shown below. P = − 1/10 s^3 + 15s^2 + 400 (a) Find the amount of money the company should spend on advertising in order to yield a maximum profit. s = thousands of dollars (b) T...
3 answers

The table below shows several pieces of information, what produces them, and theirfunction.HormoneParathyroidhormoneInsulinProduced

The table below shows several pieces of information, what produces them, and their function. Hormone Parathyroid hormone Insulin Produced By Parathyroid glands Pancreas Function works with skeletal system to control calcium storage signals the digestive system to control Inutrient homeostasis works...
3 answers

How did roosevelt's view of government differ from hoover's regarding the depression?

How did roosevelt's view of government differ from hoover's regarding the depression?...
4 answers

How did the problems Martin Luther King, Jr. addressed in the South differ from the problems he hoped

How did the problems Martin Luther King, Jr. addressed in the South differ from the problems he hoped to solve in the North?Write an original answer plz. Thank You...

-- 0.012432--