This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: %0.1f\n',n); fprintf('\nFinal Balance: %0.2f\n',B); >> interest Initial Investment: 10000 Interest Rate (percent): 4.3 Number of Years: 5 Initial Balance: 10000.00 Interest Rate: 4.3 Number of Years: 5.0 Final Balance: 12343.02 >> interest Initial Investment: 5000 Interest Rate (percent): 6 Number of Years: 6 Initial Balance: 5000.00 Interest Rate: 6.0 Number of Years: 6.0 Final Balance: 7092.60 % Determines the angle between sides a and b of % a triangle using law of cosines. a = input('Enter Side A: '); b = input('Enter Side B: '); c = input('Enter Side C: '); % Could solve as a single assignment cosgamma = (a^2 + b^2 - c^2)/(2*a*b); angle = acosd( cosgamma ); fprintf('\nA: %3d B: %3d C: %3d\n', a , b, c ); fprintf('Angle: %0.2f\n',angle); >> triangle_angle Enter Side A: 18 Enter Side B: 35 Enter Side C: 50 A: 18 B: 35 C: 50 Angle: 139.00 >> triangle_angle Enter Side A: 3 Enter Side B: 4 Enter Side C: 5 A: 3 B: 4 C: 5 Angle: 90.00...
View Full Document
This note was uploaded on 09/26/2010 for the course CHE 210 taught by Professor Swinnea during the Fall '08 term at University of Texas.
- Fall '08