ij-macro-programming-workshop

Previous            Solution            Next

Exercise 06.01 - Arrays - Creation and accessing elements

Aim:

Create an array containing the first five prime numbers. Replace the second and fourth element of the array by its square. Display the result.

Your code starts after this line







Your code ends before this line

The code below is for automatically checking the result. Please ignore it!

Array.getStatistics(a, min, max, mean, stdDev);
ok = min==2 && max==49 && mean==15.2 && (stdDev-19.2146)<0.000001;
if (ok) 
	showMessage("That's right. Great, you did it!");
else 
	showMessage("Your result is wrong! Please check your macro and try again!");

Previous            Solution            Next