Menu

[solved]-Need Fix Code Make Get Isolated Prime Numbers 0 200 Matlab Q38994063

i need to fix this code to make it get me all the isolatedprime numbers between 0 to 200 in Matlab
1 III 1 - 3-0;-1;a=0; 2 prime number are found using for loop 3- Efor n=1:200 the below for loop checks if the number is a pr1 III 1 – 3-0;-1;a=0; 2 prime number are found using for loop 3- Efor n=1:200 the below for loop checks if the number is a prime or not 5 – for 1-2:n-1 if rem (n, i) -=0 3-+1; end end the below conditional statment assigns the number vector if the element is a prime number if j-n-2 a(k) : k=k+1; end 3-O; end melength(a): find isolated prime number between 0 and 200 fprintf(‘ n’, a (1)): I for p=1:200 el for p-21m-1 11 (a (p)-a (p-1)) =2 (a (p+1)-a (p)) – 2: fprintf(‘ti n’, a (p)): end end end fprintf(‘ n’, a (m)): Command Window 113 131 137 179 191 197 199 Show transcribed image text 1 III 1 – 3-0;-1;a=0; 2 prime number are found using for loop 3- Efor n=1:200 the below for loop checks if the number is a prime or not 5 – for 1-2:n-1 if rem (n, i) -=0 3-+1; end end the below conditional statment assigns the number vector if the element is a prime number if j-n-2 a(k) : k=k+1; end 3-O; end melength(a): find isolated prime number between 0 and 200 fprintf(‘ n’, a (1)): I for p=1:200 el for p-21m-1 11 (a (p)-a (p-1)) =2 (a (p+1)-a (p)) – 2: fprintf(‘ti n’, a (p)): end end end fprintf(‘ n’, a (m)): Command Window 113 131 137 179 191 197 199

Expert Answer


Answer to i need to fix this code to make it get me all the isolated prime numbers between 0 to 200 in Matlab … . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *