Must-do problems: Loops
150 min ยท Beginner
Need help? Ask a tutor on WhatsApp (opens in a new tab)These are the loop problems every Java beginner should be able to solve, from a simple countdown to prime factors and Pascal's triangle. Trace each one on paper with a small input first, then check your program against every test.
What you will learn
- Choose between for, while and do-while for a task
- Work with digits using % 10 and / 10
- Stop or skip rounds with break and continue
- Build star, number and alphabet patterns with nested loops
Sign in to continue this lesson
Create an account to read every lesson, practise with the exercises and keep track of your progress.