Play Computer

Play computer step by step by clicking on the step button. Each time you click you get to see the next step and its effect on the variables and the screen.

  1. #include<stdio.h>
  2. int main() {
  3. int num = 1,
  4. sum = 0;
  5. while (num<10)
  6. {
  7. sum += num;
  8. num += 1;
  9. }
  10. printf("%d\n", sum);
  11. }