C Calculate The Integral O XC (1 Point) Evaluate The DoEvaluate The Given Integ
ID: 3708796 • Letter: C
Question
C Calculate The Integral O XC (1 Point) Evaluate The DoEvaluate The Given Integ C 1/?tab-wm#search/marco + arocha/ 1 62a2b2dda4 7766a ?projector 18 message Partid 0.1 s bar. Import bookmarks now... Evaluate The Doubl PDF report due before midnight on Tuesday April 17, 2018. Email subject: CP#4. Submit code plus output for each problem. 3-page max. paper copy required CP#4. Salad Bar. This is a set of small problems. | next class. One page per problem. P#1. A Pythagorean triplet is a set of three natural numbers, aExplanation / Answer
clear;
mx=0;
md=0;
mn=0;
c=0;
flag=0;
for i = 1:1000
j=i+1;
while(i+j<1000)
c=1000-i-j;
mn=min(min(i,j),c); %minimum number i.e. a
mx=max(max(i,j),c); % maximum number i.e. c
md=i+j+c-mn-mx; % middle number in series a<b<c i..e. b
if(mx*mx==(mn*mn + md*md)) %pythgores check
fprintf('a = %d ',mn);
fprintf('b = %d ',md);
fprintf('c = %d ',mx);
k=mn.*md.*mx;
fprintf('product = %d ',k);
flag=1;
break;
end
j=j+1;
end
if(flag==1)
break;
end
end
-------------------------------> output
>> etc
a = 200
b = 375
c = 425
product = 31875000
>> ?
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.