Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- V1 = randi([2 7],1,5);
- V2 = randi([3 6],1,5);
- V3 = randi([5 10],1,5);
- V4 = randi([4 10],1,5);
- V5 = randi([2 8],1,5);
- VV = V1 + V2 + V3 + V4 + V5
- i = 1;
- sum = 0;
- while i < 5,
- if VV(i) > 35,
- break
- else
- sum = sum + VV(i);
- end
- i = i + 1;
- end
- sum
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement