Hey,
Note: Brother function file are not meant to be run
directly they are either run through the command window or some
script and should be saved with the same name mentioned below. In
case of any queries brother just comment in box I would be very
happy to assist all your queries.
==================================
Save file as PaidPennies.m
=================================
function S=PaidPennies(days)
S=0;
for i=1:days
S=S+i;
end
S=S/100;
end
================================
Execcutable file
===============================
clc
clear all
close all
days=input('How many days of eemployement: ');
fprintf('Being employed for %d days earns
$%.2f\n',days,PaidPennies(days));
Kindly revert for any queries
Thanks.
0 solutions submited (max Unlimted Wrte a MATLAB program called PaidPennies that calculates how much a...