This preview shows page 1. Sign up to view the full content.
Unformatted text preview: s ‘Num' times.
Int = randi(Big); % a random integer between 1 and Num
Max = Int;
Min = Int;
fprintf('%10.0f is integer number %.0f\n',Int,count)
fprintf('\n\nThe maximum integer is %.0f\n',Max)
fprintf('The minimum integer is %.0f\n\n',Min)
Note initialization requirements. Note if-elseif structure
Education enter the maximum integer to
enter the number of integers
910847 is integer number
3814639 is integer number
7346189 is integer number
2605422 is integer number
4479828 is integer number
1713129 is integer number
5750440 is integer number
1952580 is integer number
3872758 is integer number
5350958 is integer number be generated: 7654321
to generate: 10
10 The maximum integer is 7346189
The minimum integer is 1713129
Max = 0; %initializing the smallest Max
Big = input('enter the maximum integer to be generated: ');
Min = Big; %initializing the largest Min
Num = input('enter the number of integers to generate: ');
for count=1:1:Num % go through t...
View Full Document
This note was uploaded on 01/28/2014 for the course ENGE 1114 taught by Professor Twknott during the Spring '06 term at Virginia Tech.
- Spring '06