You are on page 1of 10

ASSAM ENGINEERING COLLEGE

GUWAHATI-13

TOPIC
FINDING THE RESULTANT OF ‘n’NUMBER OF FORCES BY
TAKING INPUT FROM THE USER.

SUBMITTED TO: MR.PIYUSH SINGH(DEPARTMENT


OF MECHANICAL ENGINEERING.)
TOPIC

FINDING THE RESULTANT OF “n” NUMBER OF FORCES


BY TAKING THE INPUTS FROM THE USER.

SUBMITTED BY : SEC-D(ELECTRICAL BRANCH)

ROLL NO: KANGKANA DAS (17-150)


KARISHMAN PAUL(18-151)
ROHIT DUTTA (18-152)
KRISHANKA DAS(18-153)
ACKNOWLEDGEMENT

We are greatly indebted to the authorities of ASSAM


ENGINEERING COLLEGE for providing us the necessary
facilities to successfully carry out this mini project work
titled FINDING THE RESULTANT OF “n” NUMBER OF
FORCES BY TAKING INPUTS FROM THE USER .Firstly
we thank and express our solicit gratitude to PIYUSH
SINGH,Department of mechanical engineeering,ASSAM
ENGINEERING COLLEGE for his help and support which
helped us a lot in successfully completing our mini project.
We would also like to express our gratitude to Dr.ATUL
BORA,PRINCIPAL for providing the necessary
infrastructure to complete our project.
Finally,we would like to express our heartfelt thanks to
your parents who were very supportive both financially and
mentally and for their encouragement to achieve our set
goals.
CONTENTS

pg.no
1.)PROGRAMME IN TURBO C++ 1
2.)FLOW CHART 2
3.)ALGORITHM 3
4.)OUTPUT SCREEN 4
5.)CONCLUSION 5
PROGRAMME IN TURBO C++ TO FIND THE RESULTANT OF FORCES
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
float o[30],rx=0,ry=0,ao,ff,n,f[30],ro[30],fa;
printf("\nEnter the number of forces\n");
scanf("%f",&n);
for(int i=1;i<=n;i++)
{
printf("Enter the force %d:",i);
scanf("%f",&f[i]);
printf("Enter the angle of the force %d:",i);
scanf("%f",&o[i]);
if(o[i]>180)
{
o[i]=o[i]-180;
}
else
{
o[i]=o[i];
}
ro[i]=o[i]*22/(7*180);
rx=rx+f[i]*cos(ro[i]);
ry=ry+f[i]*sin(ro[i]);
}
ff=sqrt(rx*rx+ry*ry);
printf("Resultant force=%f",ff);
ao=atan(ry/rx);
fa=(ao*180*7)/22;
printf("\nAngle of the resultant force making with x-axis =%f",fa);
printf("\nTHANK YOU");
getch();
}
START

} O[30],rx-0,ry=0,ao,ff,n,f[30],ro[30],
Fa,i=1. FLOW
#include<stdio.h>
Entter the forces
CHART
#include<conio.h>
Get the values of
forces
#include<math.h>
void main()
{ i<n

float o[30],rx=0,ry=0,ao,ff,n,f[30],ro[30],fa;
Print the force and
printf("\nEnter theTake
number of forces\n");
the value in f
scanf("%f",&n);
for(int i=1;i<=n;i++)
Print the angle and
take it in o[i].
{
printf("Enter the forceIf%d:",i);
scanf("%f",&f[i]); o[i]>
180
printf("Enter the angle of the force %d:",i);
scanf("%f",&o[i]);
o[i]=o[i]-180 o[i]=o[i]
if(o[i]>180)
{
ro[i]=o[i]*(22/7)*180
o[i]=o[i]-180;
} rx=rx+f[i]*cos(ro[i])
else
{ ry=ry+f[i]*sin(ro[i]) ao=atan(ry/rx)
o[i]=o[i];
ff=sqrt(rx*rx+ry*ry)
} Print the
ro[i]=o[i]*22/(7*180); Value of
ao.
rx=rx+f[i Print the values
Of ff

ALGORITHM OF THE PROGRAMME


END

END
ALGORTHIM OF THE PROGRAMME.

STEP 1: Declare the variable


O[30],r x=O,r y=O,a 0,f f,n,f[30],r 0[30],f a,i=1
STEP 2:Print enter the forces .
STEP 3:Take the value of forces.
STEP 4:For i less than n.
STEP 5:Take the forces and take the value at i.
STEP 6:Take the angle and take it in O[i].
STEP 7:If O[i] is greater than 180*.
STEP 8:If yes O[i]=O[i]-180.
STEP 9:If no O[i]=O[i]
STEP10:r o[i]=O[i]*(22*180)/7,r y=r x+f(i)*cos[r o[i],r y=r y+f[i]*sin(r o[i]

),f f=(r x*r y+r y*r y)^2.

STEP 11:If is not less than n.

STEP 12:Take the value of f f.

STEP 13:Calculation of a o=atan(r y/r x),f a=(a o*180*7)/22

STEP 14:Print the value of f a.

STEP 15:End.
OUTPUT SCREEN
CONCLUSION
Programming language has spreaded its hands to all

branches of technology specially in engineering

branches.The use of programming language in solving

various algorithmic problems in mechanics has become

very important.The knowlege of programming language

has become today an utmost important aspect in the field

of engineering.Engineering mechanics has been widely

grabbed by the knowledge of programming language to

solve its various characteristics problems.

You might also like