size(200, 200); int n = 7; int factorial = 1; for(int i = 1; i <= n; i++){ // Changed the loop condition and starting value of i factorial = factorial * i; } textAlign(CENTER); text(factorial, 100, 100); // Removed quotes around "factorial" to display the value of factorial