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
Arlecino [84]
3 years ago
5

Write C code that does the following: 1. Numerically compute the following series 1−13+15−17+..=????4 and approximate π. Vary it

eration numbers. Note that the general term, an, is expressed as ????????=(−1)????+12????−1

Engineering
1 answer:
yulyashka [42]3 years ago
3 0

Answer:

Explanation:

See attachment for the screen shot of the code.

//Sample Output

nter the numberof iterations4 The sum of the series is0.723810

//Code to copy

#include<stdio.h>

int main()

{

// Declare and initialize the Variables

int i, n;

int sign_flag = 1;

double sum = 0.0;

// Taking the number of iteration as input

printf("Enter the number of iterations ");

scanf("%d", &n);

// Sum upto n terms

// Sign flag is used for alternate positive and negative terms

for (i = 1; i <= n; i++)

{

sum = sum + sign_flag*(1.0 / (2 * i - 1));

sign_flag = -sign_flag;

}

// Print the sum

printf("The sum of the series is %lf\n", sum);

return 0;

}

You might be interested in
Design a sequential circuit DETECTOR that has one input X and one input Y. The DETECTOR detects the sequence 110. If an input X
Novosadov [1.4K]

Answer:

See explaination

Explanation:

This is going to require diagrams, please kindly see attachment for the detailed step by step solution of the given problem.

5 0
3 years ago
I have five brainliest why is it only showing 2?
svp [43]

Answer: Either your computer is malfunctioning or it is glitched and still thinks you only have 2. Also good job

Explanation: Leave a brainliest it helps

4 0
3 years ago
Consider a 20-cm X 20-cm X 20-cm cubical body at 477°C suspended in the air. Assuming the body closely approximates a blackbody,
Olin [163]

Answer:

a) The rate at which the cube emits radiation energy is 704.48 W

b) The spectral blackbody emissive power is 194.27 W/m²μm

Explanation:

Given data:

a = side of the cube = 0.2 m

T = temperature = 477°C

Wavelength = 4 µm

a) The surface area is:

A_{s} =6a^{2} =6(0.2)^{2} =0.24m^{2}

According Stefan-Boltzman law, the rate of emission is:

E=\sigma T^{4} A_{s} =5.67x10^{-8} *(477)^{4} *0.24=704.48W

b) Using Plank´s distribution law to get the spectral blackbody emissive power.

E=\frac{C_{1} }{\lambda ^{5}(exp(\frac{C_{2} }{\lambda T}) -1 )} =\frac{3.743x10^{8} }{4^{5}(exp(\frac{1.4387x10x^{4} }{4*477})-1)  } =194.27W/m^{2} \mu m

8 0
4 years ago
A gas turbine receives a mixture having the following molar analysis: 10% CO2, 19% H2O, 71% N2 at 720 K, 0.35 MPa and a volumetr
Sliva [168]

Answer:

2074.2 KW

Explanation:

<u>Determine power developed at steady state </u>

First step : Determine mass flow rate  ( m )

m / Mmax = ( AV )₁ P₁ / RT₁   -------------------- ( 1 )

<em> where : ( AV )₁ = 8.2 kg/s,  P₁ = 0.35 * 10^6 N/m^2,   R = 8.314 N.M / kmol , </em>

<em>  T₁  = 720 K . </em>

insert values into equation 1

m  = 0.1871  kmol/s  ( mix )

Next : calculate power developed at steady state ( using ideal gas tables to get the h values of the gases )

W( power developed at steady state )

W = m [ Yco2 ( h1 - h2 )co2

Attached below is the remaining  part of the detailed solution

4 0
3 years ago
A solenoid with a length of 20 cm and a radius of 5 cm consists of 400 turns and carries a current of 12 A. If z = 0 represents
forsale [732]

Answer:

Copy MATLAB code to plot the magnitude of magnetic field strength with respect to z on the axis of solenoid:

z=-20:0.01:20;

H=120.*(((20-(2.*z))./sqrt((20-(2.*z)).^2+100))+((20+(2.*z))./sqrt((20+(2.*z)).^2+100)));

plot(z,H)

title('plot of |H| vs z along the axis of solenoid')

ylabel('Magnitude of magnetic field 'H")

xlabel('position on axis of solenoid 'z")

Explanation:

full explanation is attached as picture and the resultant plot also.

5 0
4 years ago
Other questions:
  • A rectangular beam of width b = 15 in., effective depth d = 20.5 in., and total depth h = 23 in. spans 18.5 ft. between simple s
    14·1 answer
  • Find the total amount of heat in Q lost through a wall 10' by 18' , with R value from q. 1. Inside temperature is 70 degrees F w
    5·2 answers
  • There are 10 vehicles in a queue when an attendant opens a toll booth. Vehicles arrive at the booth at a rate of 4 per minute. T
    6·1 answer
  • A seamless pipe 800mm diameter contains a fluid under a pressure of 2N/mm2. If the permissible tensile stress is 100N/mm2, find
    11·1 answer
  • The flow rate of liquid metal into the downsprue of a mold = 0.7 L/sec. The cross-sectional area at the top of the sprue = 750 m
    7·1 answer
  • an electric circuit includes a voltage source and two resistances (50 and 75) in parallel. determine the voltage source required
    6·2 answers
  • In the circuit given below, R1 = 17 kΩ, R2 = 74 kΩ, and R3 = 5 MΩ. Calculate the gain 1formula58.mml when the switch is in posit
    7·1 answer
  • An inductor is energized as in the circuit of Fig. 2-4a. The circuit has L 10 mH and VCC 14 V. (a) Determine the required on tim
    5·1 answer
  • How deep does electrical conduit need to be buried?
    14·1 answer
  • primitive transportation and storage systems that make local distribution ineffective if not impossible, the lack of clean water
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!