1 2 3 4
clc; P=2.5; //Power in D f=-(1/P); //calculating f in m disp(f,"Focal length in m = "); //displaying result