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
icon
Related questions
Question

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 = 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
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Bare Bones Programming Language
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning