160 likes | 533 Views
More loops. The percentage of bosses that think that their jokes are “very very funny” is. 3 95 98. This percentage of employees who think that their bosses are “very very funny” is. 3 95 98.
E N D
The percentage of bosses that think that their jokes are “very very funny” is • 3 • 95 • 98
This percentage of employees who think that their bosses are “very very funny” is • 3 • 95 • 98
This percentage of employees think that their bosses are “very very funny” when the boss is conducting the survey is • 3 • 95 • 98
The output of the last line isfor i=1:1:3 for j=1:1:2 s=i*j; endends • 0 • 2 • 6 • 11
The output of the last line iss=5;for i=1:1:3 for j=1:1:2 s=i*j; endends • 1 • 5 • 6 • 11
The output of the last line issum1=0;for i=1:1:3 for j=1:1:3 sum1=sum1+4; endendsum1 • 0 • 4 • 12 • 36
The output of the last line issum1=0;for i=1:1:3 for j=1:1:3 sum1=sum1*2; endendsum1 • 0 • 18 • 64 • 128
The output of the last line issum1=1;for i=1:1:3 for j=1:1:3 sum1=sum1*2; endendsum1 • 0 • 18 • 128 • 512
The output of the last line isi=0;while i<=4 j=i*3; i=i+1;endj • 0 • 5 • 12 • 15
The output of the last line isi=0;while i<=4 i=i+1; j=i*3; endj • 0 • 5 • 12 • 15
The output of the last line isf=inline(′x^2′);sum=f(2)+f(4) • 4 • 6 • 16 • 20
The output of the last line isf=inline(′x^2′);sum=f(2+4) • 6 • 16 • 20 • 36
function out=valfun(f,a,b)% f= function of x% a= input real number% b= input real numberout=(f(a)-b)/5is saved in valfun.m file, what would be the output of the last line of the following test programg=inline(′2*x′)outvalue=valfun(g,3,4) • -2/5 • 2/5 • 6/5 • 6
The output of the last line isfor i =1:1:2 a(i,i)=0;endsum1=0;for i=1:1:2 for j=1:1:2 sum1=sum1+5; endendsum1 • 0 • 5 • 10 • 20