*******
5 seconds 4 seconds 3 seconds 2 seconds 1 seconds
Give me a P Give me a Q Give me a R Give me a S
2 4 16
for (x = 6; x >= 0; x--) println("x = " + x + ", 2x + 5 = " + (2*x + 5));
for (x = 0; x <= 30; x += 3) println("x = " + x + ", 2x + 5 = " + (2*x + 5));
for (x = -15; x <= 15; x += 5) println("x = " + x + ", 2x + 5 = " + (2*x + 5));
for (x = 1; x <= 1024; x *= 2) println("x = " + x + ", 2x + 5 = " + (2*x + 5));
float sum = 0; for (int i = 1; i <= 1000; i++) sum += 1.0 / i;
float sum = 0; for (int i = 100; i <= 5000; i += 100) sum += sqrt(i);
long product = 1; for (int i = 1; i <= 20; i++) product *= i;
void setup() { int input = getInt("Please enter an integer."); for (int i = 1; i <= input; i++) println(input + " x " + i + " = " + (i * input)); }
void setup() { final int UPPER_BOUND = 40; println("Number Square Square Root Reciprocal"); for (int i = 1; i <= UPPER_BOUND; i++) { print(i + " "); print(i*i + " "); print(nf(sqrt(i),1, 5) + " "); println(nf(1/(float)i,1, 5)); } }
if (i % 5 == 0) println();