% This code calculates the surface area of an oblate sphere
% and the surface area of a uniform sphere and the difference
% between the two surface areas

r1 = input('Enter equatorial radius in miles: ');
r2 = input('Enter polar radius in miles: ');

sa1 = 4*pi*r1*r2;
sa2 = 4*pi*((r1 + r2)/2)^2;

diff = abs(sa1 - sa2);

fprintf('Difference between oblate and normal surface areas (mile^2) is %f\n', diff);
