Assignment14_Exercise3

# Assignment14_Exercise3 - fprintf('The final salary for...

This preview shows page 1. Sign up to view the full content.

% Ashwin Satish % ENES 101 / 0103 % Assignment #14 - Exercise 3 % clear, clc c % Get user input. .. % empnum = input('Please enter the EMPLOYEE NUMBER: '); currentsal = input('Please enter the CURRENT SALARY for the Employee: '); c for rating = input('Please enter a RATING (1-5) for the Employee: '); if (rating == 5) disp(' '); currentsal = currentsal + currentsal * .04; fprintf('The final salary for Employee #%1.0f is \$%3.2f. \n', empnum, currentsal); disp('---------'); elseif (rating == 4) disp('The new SALARY is: \$'); currentsal = currentsal + currentsal * .03;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: fprintf('The final salary for Employee #%1.0f is \$%3.2f. \n', empnum, currentsal); disp('---------'); elseif (rating == 3) disp('The new SALARY is: \$'); currentsal = currentsal + currentsal * .02; fprintf('The final salary for Employee #%1.0f is \$%3.2f. \n', empnum, currentsal); disp('---------'); else disp('The new SALARY is: \$'); currentsal = currentsal + currentsal * .01; fprintf('The final salary for Employee #%1.0f is \$%3.2f. \n', empnum, currentsal); disp('---------'); end end e % End of Exercise...
View Full Document

## This note was uploaded on 08/28/2011 for the course ENES 101 taught by Professor Bayles during the Spring '08 term at UMBC.

Ask a homework question - tutors are online