summaryrefslogtreecommitdiff
path: root/2939/CH1/EX1.6/Ex1_6.sce
blob: 2044888ce2360189bd370c92a735b7945f7e2a95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//Ex1_6

clc;

//Given:

wavelength=1.5*10^-10;
h=6.62*10^-34;
c=3*10^8;

//solution:

e=(h*c)/wavelength;// energy in J
e1=e/(1.6*10^-19);// energy in eV

printf("The energy in eV is = %f ",e1)