Com Lecture 5 Debugging
Com Lecture 5 Debugging
if (n > 1)
System.out.println(n);
}
}
Example: The factoring problem
Digits in the largest i <= n i <= n / i
factor
3 Instant Instant
6 instant Instant
9 77 Instant
12 21 hours Instant
15 2.4 years 2.7 seconds
18 2,400 years 97 seconds
Example: The factoring problem
•
Summary
Edit program
Syntax error
Compile
e r r o r
t i m e
ru n
i c e r ror
Run – does it work as intended? e m a nt
S
c e e r ror
f o r m an
Test – with real input data per