summaryrefslogtreecommitdiff
path: root/1985/CH12/EX12.2/Chapter12_example2.sce
blob: 3ae8f067b32d988f5f1c99ebe0ea28a94fe9fe56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
clc
clear
//Input data
E=3//Energy of photon in eV
c=3*10^8//Velocity of light in m/s
e=1.6*10^-19//Charge of electron in Columbs

//Calculations
p=((E*e)/c)/10^-27//The momentum of the photon in kg.m/s

//Output
printf('The momentum of the photon is %3.1f*10^-27 kg.m/s',p)