blob: 136ecb1f45cb119d808b2868b18e46f234b3f526 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//Chapter 34 Ex 4
clc;
close;
clear;
theta1=(60*%pi)/180; theta2=(30*%pi)/180; //converted into radian
d1=36; //given
x=poly(0,'x');
for x=1:25
if round((d1+x)*tan(theta2))==round(x*tan(theta1)) then
break
end
end
mprintf("The breadth of the river is %d meters",x);
|