1. START
END
Display
==========================
Welcome
===========================
Basic Physics CalculatorMenu
===========================
1.Linear Motion
2.Newton's Laws of Motion
3.Moment of Force
4.Work and Energy
Declare Variables
i,j,k,o,p,q,n as int
a,u,v,t,s,F,m,a1,M,F1,d,P,t1,F2,
v1,s1,W,PE,KE,Ep,Eps,K,S,m1,g,
h,m2,v2 as float
Display
"Choose topic : "
Read & store the
input, i
(i==1)
Display
You choose Linear Motion
======================
==You have to know 3 variable
to find others variable==
a=acceleration (m/s^2)
u=initial velocity (m/s)
v=final velocity (m/s)
t=time (s)
s=displacement (m)
What did 3 variable you know?
1.s , u , v 6.a , t , s
2.u , v , t 7.v , t , a
3.v , t , s 8.v , u , a
4.t , s , u 9.u , a , s
5.u , t , a 10.a , s , v
Please choose :
Read & store the
input, j
(j==1)
Display
INPUT s :
Read & store the
input, s
Display
INPUT u :
Read & store the
input, u
Display
INPUT v :
Read & store the
input, v
Calculate
t=(2*s)/(u+v)
a=(v*v-u*u)/(2*s)
Display
t=%.2f,t
a=%.2f,a
(j==2)
Display
INPUT u :
Read & store the
input, u
Display
INPUT v :
Read & store the
input, v
Display
INPUT t :
Read & store the
input, t
Calculate
s=(((u+v)/2)*t)
a=((v-u)/t)
Display
s=%.2f,s
a=%.2f,a
(j==3)
Display
INPUT v :
Read & store the
input, v
Display
INPUT t :
Read & store the
input, t
Display
INPUT s :
Read & store the
input, s
Calculate
u=(((2*s)/t)-v)
a=((v-u)/t)
Display
u=%.2f,u
a=%.2f,a
(j==4)
Display
INPUT t :
Read & store the
input, t
Display
INPUT s :
Read & store the
input, s
Display
INPUT u :
Read & store the
input, u
Calculate
v=(((2*s)/t)-u))
a=((v-u)/t)
Display
v=%.2f,v
a=%.2f,a
(j==5)
Display
INPUT u :
Read & store the
input, u
Display
INPUT t :
Read & store the
input, t
Display
INPUT a :
Read & store the
input, a
Calculate
v=(u+(a*t))
s=(((u+v)/2)*t)
Display
v=%.2f,v
s=%.2f,s
(j==6)
Display
INPUT a :
Read & store the
input, a
Display
INPUT t :
Read & store the
input, t
Display
INPUT s :
Read & store the
input, s
Calculate
v=((s/t)+(a*t/2))
u=(((2*s)/t)-v)
Display
v=%.2f,v
u=%.2f,u
(j==7)
Display
INPUT v :
Read & store the
input, v
Display
INPUT t :
Read & store the
input, t
Display
INPUT a :
Read & store the
input, a
Calculate
u=(v-(a*t))
s=(((u+v)/2)*t)
Display
u=%.2f,u
s=%.2f,s
(j==8)
Display
INPUT v :
Read & store the
input, v
Display
INPUT u :
Read & store the
input, u
Display
INPUT a :
Read & store the
input, a
Calculate
t=((v-u)/a)
s=(((u+v)/2)*t)
Display
t=%.2f,t
s=%.2f,s
(j==9)
Display
INPUT u :
Read & store the
input, u
Display
INPUT a :
Read & store the
input, a
Display
INPUT s :
Read & store the
input, s
Calculate
v=sqrt((u*u)+(2*a*s))
t=((v-u)/a)
Display
v=%.2f,v
t=%.2f,t
(j==10)
Display
INPUT a :
Read & store the
input, a
Display
INPUT s :
Read & store the
input, s
Display
INPUT v :
Read & store the
input, v
Calculate
u=sqrt((v*v)-(2*a*s))
t=((v-u)/a)
Display
u=%.2f,
t=%.2f,t
Display
Errortry again
(i==2)
Display
You choose Linear Motion
======================
What do you want to find?
1.F=Net Force (N)
2.m=Mass (kg)
3.a=Acceleration (m/s^2)
Please choose :
Read & store the
input, k
(k==1)
Display
INPUT m :
Read & store the
input, m
Display
INPUT a :
Read & store the
input, a1
Calculate
F=m*a1
Display
F=%.2f,F
(k==2)
Display
INPUT F :
Read & store the
input, F
Display
INPUT a :
Read & store the
input, a1
Calculate
m=F/a1
Display
m=%.2f,m
(k==3)
Display
INPUT F :
Read & store the
input, F
Display
INPUT m :
Read & store the
input, m
Calculate
a1=F/m;
Display
a=%.2f,a1
Display
Errortry again
Display
Use this equation
: F=ma
Display
Use this equation
: m=F/a
Display
Use this equation
: a=F/m
(i==3)
Display
You choose Moment of Force
======================
What do you want to find?
1.M=Moment(N.m)
2.F=Force (N)
3.d=distance (m)
Please choose :
Read & store the
input, o
(o==1)
Display
INPUT F :
Read & store the
input, F1
Display
INPUT d :
Read & store the
input, d
Calculate
M=F1*d
Display
M=%.2f,M
(o==2)
Display
INPUT M :
Read & store the
input, M
Display
INPUT d :
Read & store the
input, d
Calculate
F1=M/d
Display
F=%.2f,F1
(o==3)
Display
INPUT M :
Read & store the
input, M
Display
INPUT F :
Read & store the
input, F1
Calculate
d=M/F1
Display
d=%.2f,d
Display
Errortry again
Display
Use this equation
: M=Fd
Display
Use this equation
: F=M/d
Display
Use this equation
: d=M/F
(i==4)
Display
You choose Work and
Energy
======================
What do you want to find?
1.W=Work (J)
2.PE=PotentialEnergy (J)
3.KE=Kinetic Energy (J)
Please choose :
Read & store the
input, p
(p==1)
Display
==You choose to find work==
What did variables you know?
P=power t=time
F=Force v=velocity
s=second
1.P,t
2.F,s
3.F,v,t
Please choose :
Read & store the
input, q
(q==1)
Display
INPUT P :
Read & store the
input, P
Display
INPUT t :
Read & store the
input, t1
Calculate
W=P*t1
Display
W=%.2f,W
(q==2)
Display
INPUT F :
Read & store the
input, F2
Display
INPUT s :
Read & store the
input, s1
Calculate
W=F2*s1
Display
W=%.2f,W
(q==3)
Display
INPUT F :
Read & store the
input, F2
Display
INPUT v :
Read & store the
input, v1
Calculate
W=F2*v1*t1
Display
W=%.2f,W
Display
INPUT t :
Read & store the
input, t1
Display
Errortry again
(p==2)
Display
==You choose to find work==
What did variables you know?
1.Ep=Gravitational Potential
Energy (J)
2.Eps=Elastic Potential Energy
(J)
Please choose :
Read & store the
input, n
Display
m=mass K=spring constant
g=gravity S=amount of stretch
h=height
(n==1)
Display
INPUT m :
Read & store the
input, m1
Display
INPUT g :
Read & store the
input, g
Calculate
Ep=m1*g*h
Display
Ep=%.2f,Ep
Display
INPUT h :
Read & store the
input, h
Display
INPUT K :
Read & store the
input, K
Display
INPUT S :
Read & store the
input, S
Calculate
Eps=0.5*K*S*S
Display
Eps=%.2f,Eps
(n==2)
Display
Errortry again
(p==3)
Display
==You choose to find Kinetic
Energy==
m=mass (kg)
v=velocity (m/s)
Display
INPUT m :
Read & store the
input, m2
Display
INPUT v :
Read & store the
input, v2
Calculate
KE=0.5*m2*v2*v2
Display
KE=%.2f,KE
Display
Errortry again
Display
Errortry again
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Display
Exit ::choose 1
or anything
Back to Main
Memu :: choose
2 only
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
Read & store the
input, z
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu (z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu
(z==1)
(z==2)
Nothing
Back to Main
Menu