blob: bfde0c4e1a32dd3d3c58f9d76e8dd0ed2a4f79e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//To calculate the kinetic energy
//Example 25.1
clear;
clc;
m=10;//mass in kg
v=36;//speed in kmph
E=[1/2*m*(v*10^3/3600)^2]/4.186;//formula for finding kinetic energy
printf("kinetic energy=%f cal",E);
|