Access Millions of academic & study documents

18.8

Content type
User Generated
Subject
Engineering
Type
Homework
Showing Page:
1/1
prompt = 'Type the selling price of a maple bat(in dollars):';
Sm=input(prompt);
prompt = 'Type the selling price of a bamboo bat(in dollars):';
Sb=input(prompt);
prompt = 'Type total number bats manufacturer can produce per week :';
b=input(prompt);
prompt = 'Type number of weeks manufacturer plans to run production :';
w=input(prompt);
% Total nuber of bats=Bats per week * total weeks
B=b*w;
% Revenue will quantity * selling price per unit
Rm=Sm*B;
Rb=Sb*B;
fprintf('Producing %d bats a week for %d weeks will generate:\n', b,w);
fprintf('\t Maple bat revenue: $%d\n', Rm);
fprintf('\t Bamboo bat revenue: $%d\n', Rb);
% Used %0.3e for printing answer in exponential form with 3 digit precision
fprintf('Total number of bats produced: %0.3e', B);

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
prompt = 'Type the selling price of a maple bat(in dollars):'; Sm=input(prompt); prompt = 'Type the selling price of a bamboo bat(in dollars):'; Sb=input(prompt); prompt = 'Type total number bats manufacturer can produce per week :'; b=input(prompt); prompt = 'Type number of weeks manufacturer plans ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4