Facebook
From Adjowa Asamoah, 1 Month ago, written in Plain Text.
This paste is a reply to part 1 from Adjowa Asamoah - go back
Embed
Viewing differences between part 1 and Re: part 1
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" "factorial" to display the value of factorial
factorial

save("Assignment5_part1")