Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solving this problem with C Language Program Question 2 (15 marks) A total charge Q (C, Coulombs) is uniformly distributed around a ring-shaped conductor with

Solving this problem with C Language Program

image text in transcribed

image text in transcribed

Question 2 (15 marks) A total charge Q (C, Coulombs) is uniformly distributed around a ring-shaped conductor with radius a (m). A charge q (C, Coulombs) is located at a distance x from the center of the ring (see below). The force exerted on the point charge by the ring is given by 4ne0 (xa where eo = 8.85 10-12 C2/(N m2) (free space permittivity) Develop a program that gets from the user, the charge that exists on both the ring and the point charge to compute the force exerted on the point charge by the ring For the main function Obtains the data from the user and save them in appropriate variables. Calls the function force to compute the force exerted on the point charge by the ring Display results to the user in a message (see the following example) that includes data input by the user. Format the output values to display at most the number of digits in the fractional part of the real values shown the message example. The charge on the ring is 2e-005 Coulombs The charge on the point is 2e-005 Coulombs The radius of the ring is 0.90 m The distance between the center of the ring and the point is 0.30 m The force exerted on the point is 1.26 N o o o For the function force o o o Define parameters to receive the data input by the user Define local variable for storing the force F Use a symbolic constant for the values of eo (e.g. E0). Note that the math header file provides the symbolic constant M-PI for the value of . o Use the functions from the math library for computing the power expressions. o Instead of using a single instruction to compute the force value, use a number of instructions to "accumulate" values into the variable F as follows. Note that these are not true mathematical equations but show how Fas a computer variable can accumulate intermediate values during the computation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

Slimming down of HR departments.

Answered: 1 week ago

Question

600 lb 20 0.5 ft 30 30 5 ft

Answered: 1 week ago