Sum of random numbers...
clear all
totalsum=0
for b=rand(1,100)
if b>0.5
totalsum=totalsum+b;
end
end
sprintf('The total sum of the random numbers greater than 0.5 in a randomly\ngenerated array of 100 elements is %g',totalsum)
MWAHAHAHHAAHAHA
totalsum=0
for b=rand(1,100)
if b>0.5
totalsum=totalsum+b;
end
end
sprintf('The total sum of the random numbers greater than 0.5 in a randomly\ngenerated array of 100 elements is %g',totalsum)
MWAHAHAHHAAHAHA
Leave a comment
« close »