Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

According to Coulomb's Law, two electrically charged particles attract or repel one another with a force F that is proportional to their charges q1 and q2 and inversely proportional to the square of the distance r between them: F = k q1 q2 / r 2 The constant of proportionality, k, is called Coulomb's constant. If the force is measured in newtons (that is, kilogram-meters per second squared) and the charges are measured in coulombs, the value of Coulomb's constant is 8.988 * 109 newton-square-meters per square coulomb (8.988 * 109 N m2 / C2). Analyze the problem, design a solution and then develop a C++ program to implement the formula above to computes the force of repulsion between two similarly charged particles, given their charges (in coulombs) and the distance between them (in meters). Prompt user for charge for each particle and the distance between them. Produce a report presenting all the values clearly labeled including units associated with them. Print the values in 2 forms once in fixed format using 5 digits precision for all values and a second time using scientific notation. Make sure to include your analysis and design (algorithm) as a comment block with your program

Program #2

A right circular cone has a circular base, and the line from the center of the base to the tip of the cone forms a right angle with the base.

If you know the height (h) of a cone and the radius (r) of the base of the cone, then you can calculate the slant height (s), surface area (a), and volume (v) of the cone using the following formulas.

Slant Height: s = √

Surface Area: A =

Volume: v =

Note that the slant height is the hypotenuse of the right triangle, whose other two sides are the height and the radius of the base.

Again, don't let the equations intimidate you. These formulas simply perform addition, multiplication, division, squaring, and finding a square root.

Requirements:

Write a program that will:

Display a program description to the user before asking for any input.

Defines a constant for PI, using fixed notation, carried out to 5 decimal places (value for Pi was given in program 1).

Read the height of a right circular cone, as input from the user.·

Read the radius of the base of a right circular cone, as input from the user.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92020778
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Programming Language

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As