C++ program to compute for the magnitude and direction of the resultant of 2 forces
C++ program to compute for the magnitude and direction of the resultant of 2 forces
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.4: For Loops
Problem 12E
Related questions
Question
Write a C++
of 2 forces. The program must also indicate the Quadrant where the angle of
resultant is located. The magnitudes and directions of the two forces are to be
entered from the keyboard. Use the following formulas:
Rx = Acosα + Bcosβ Ry = Asinα + Bsinβ
R = sqrt(Rx^2) θ = tan^-1(Ry/Rx)
![Write a C++ program to compute for the magnitude and direction of the resultant
of 2 forces. The program must also indicate the Quadrant where the angle of
resultant is located. The magnitudes and directions of the two forces are to be
entered from the keyboard. Use the following formulas:
Rx = Acosa + Bcosß
Ry = Asina + Bsinß
Ry
e = tan
R =
V Rx2 + Ry2
Rx
Use manipulators to format the output display.
Sample Input/Output display:
Enter Force A and its angle, CCW from +x-axis: 100
180
Enter Force B and its angle, CCW from +x-axis: 100 90
Resultant, R = 14.142
e = 45 degrees, 2nd
Quadrant
Enter Force A and its angle, CCW from +x-axis: 100 30
Enter Force B and its angle, CCW from +x-axis: 200 210
Resultant, R = 100
8 = 30 degrees, 3rd Quadrant](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6834c1bc-3183-45ef-99f9-816c82fdfa4e%2F37ce0514-5419-4a14-9a9b-d3c4c799ebe2%2Fyfn8jw_processed.png&w=3840&q=75)
Transcribed Image Text:Write a C++ program to compute for the magnitude and direction of the resultant
of 2 forces. The program must also indicate the Quadrant where the angle of
resultant is located. The magnitudes and directions of the two forces are to be
entered from the keyboard. Use the following formulas:
Rx = Acosa + Bcosß
Ry = Asina + Bsinß
Ry
e = tan
R =
V Rx2 + Ry2
Rx
Use manipulators to format the output display.
Sample Input/Output display:
Enter Force A and its angle, CCW from +x-axis: 100
180
Enter Force B and its angle, CCW from +x-axis: 100 90
Resultant, R = 14.142
e = 45 degrees, 2nd
Quadrant
Enter Force A and its angle, CCW from +x-axis: 100 30
Enter Force B and its angle, CCW from +x-axis: 200 210
Resultant, R = 100
8 = 30 degrees, 3rd Quadrant
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning