Question: Create a flowchart Algorithm for the flowing code. n=input('Enter the number of forces n : '); Fx=0; Fy=0; for i=1:n fprintf('Enter tha value of F%d
Create a flowchart Algorithm for the flowing code.
n=input('Enter the number of forces n : '); Fx=0; Fy=0; for i=1:n fprintf('Enter tha value of F%d : ',i); F(i)=input(''); fprintf('Enter tha value of thetha%d in degree : ',i); th(i)=input(''); Fx=Fx+F(i)*cosd(th(i)); Fy=Fy+F(i)*sind(th(i)); end Fr=sqrt(Fx^2+Fy^2); tr=atand(Fy/Fx); fprintf('The magnitude of the resultant force is %f ',Fr) fprintf('The direction of the resultant force is %f degree from x-axis ',tr);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
