% roadProject.m   P. Conrad   for CISC106 Final Exam
% choose lowest total cost road project



constructionCost = [ 127.5  200.0  250.0  210.0];  
mitigationCost = [150.0 25.0 0.0 12.5];


codeName{1} = 'red';
codeName{2} = 'blue';
codeName{3} = 'green';
codeName{4} = 'yellow';


totalCost = constructionCost + mitigationCost;

minIndex = 1;
for k=2:length(totalCost)
   if ( totalCost(k) < totalCost(minIndex) )
      minIndex = k;
   end % if
end %for

fprintf('The project with the lowest cost is %s\n', ... 
	codeName{minIndex});




