%Drag Force Calculation

%Units 
Units = input('State if SI or English units:');             %User states if units are SI or English
SI = 1;
English = 2;
%User Inputs
if Units == 1;
    
    Cd = input('Enter Drag Coefficient Here:');             %User inputs drag coefficient

    rho = input('Enter Fluid Density [m^3/s]:');            %User inputs fluid density

    A = input('Enter Area [m^2]:');                         %User inputs area

    v = input('Enter velocity [m/s]:');                     %User inputs velocity
else 
    Cd = input('Enter Drag Coefficient Here:');             %User inputs drag coefficient

    rho = input('Enter Fluid Density [slugs/ft^3]:');       %User inputs fluid density

    A = input('Enter Area [ft^2]:');                        %User inputs area
 
    v = input('Enter velocity [ft/s]:');                    %User inputs velocity
end
%Calculations
Drag = Cd * rho * (( v^2 * A ) / 2);                        %Calculation of drag force

%Results
if Units == 1;
    fprintf('The Force of Drag is %f [N]',Drag)             %Drag in SI units
else
    fprintf('The Force of Drag is %f [lbf]',Drag)           %Drag in English units
end
